copy objects to array by reference

Created a new function to copy list of objects to a new array