The best way to copy any complex data structure is to use something like the
Clone module; it will make a complete copy of all nested data items for you. Mind you, if you are trying to make a new array but with the same references to hashes, you'll have to do a element-by-element copy, as Clone will try to make copies of the hashes instead.