Turns the array of photos into an array of objects.