In place copy for dynamic arrays