Differentiating object and array indices