Promote array indices to int