Index an array of objects