Major reorganization of the code in GpuArray_setarray to avoid allocating a temporary GpuArray.