Thanks to this discussion an example has been created to show how to scatter and gather a 2D array, as can be found here.
We do need to use VBuffer
but as inputs it only needs the data and a counts array. The problem I had before of trying to construct an array of different sizes is avoided by simply having the scattered array as output.
This code makes a lot of sense to me and I can certainly use this moving forward but if others had suggestions please let me know.