download photos and store into an array