Created PopulateImageArray method