def convert_dict_to_array(data):
    """Convert a dict-based format to an array."""
    items = []
    nmap = {}
    index = 0
    nodes = data.get('nodes', ())
    rels = data.get('rels', ())
    for nindex, node in enumerate(nodes):
        items.append(node)
        nmap[nindex] = index
        index += 1
    for rel in enumerate(rels):
        items.append(rel)
        rel['start'] = nmap[rel['start']]
        rel['end'] = nmap[rel['end']]
    return data
