def tag_index_array_pointer(parent=None, new_value=None, magic=0, **kwargs):
    """
    Calculates the pointer value for a tag_index array based on file offset.
    """
    if new_value is None:
        return parent.tag_index_offset - magic
    parent.tag_index_offset = new_value + magic
