imls_to_arr function

convert a list of im objects to a three-dimensional array