Adding convenience methods for adding index to arrays of objects