def index_array(col):
    """
    Assemble an array of (head, text) tuples into an array of
    {"section_head": head, "section_text": text, "section_idx": i}
    """
    indexed_text = [{"section_head": h, "section_text": t, "section_idx": i} for i, (h, t) in enumerate(col)]
    return indexed_text