Added index of method to Array class