I have looked at this in the past, and I think that G-code is the wrong way to do it.
I think that what is needed is a component that takes a bitmap image as input and outputs a laser intensity based on the (X,Y) coordinates of the laser.
Then the G-code just needs to create a raster pattern.
In your situation you would have 10 of these components running in parallel, but using the same bitmap data.
Of course this hypothetical component doesn't exist. I did make a start on it once, and got part-way there (It needs to be two components, one user-space component with file system access which loads a shared-memory area with the data, and a separate real-time module which reads the bitmap data and calculates the laser intensity)
I did, however, once make a start on this,
forum.linuxcnc.org/forum/24-hal-componen...al-power-laser#22961