fixing NewOnGpu with new optimization for arrays of primitive types.