def convert_lines_to_object(lines: list) -> dict:
    """
    Convert an array of lines into an object indexed by the line number
    Indexing from 0

    Parameters
    ----------
    lines : list
        The list of lines to convert

    Returns
    -------
    dictionary
        A dictionary of the lines, indexed by the line number (starting from 0)
    """
    i = 0
    pad_to = len(str(len(lines)))
    obj = {"count": len(lines)}
    for line in lines:
        obj.update({"line" + str(i).rjust(pad_to, "0"): line})
        i += 1

    return obj