Clear the source array of its elements to solve problems with unref'ing it later
Add an optional copy parameter, keeps the source array intact