copy_grid optimized with for loops and int::range