I tend to collect large amounts of identical notes - so the question didn’t occur to me.
Given my usage, I'd think :
* specify number of rows (respectively columns)
* choose row-wise or column-wise layout
* lay out notes. Each column is as large as largest note in that column, each row is as high as the highest note in that row.
Laying out to largest dimension of all notes may become awkward if you have an outlier in one dimension.
Here's an example where sorting is row-wise:
Layout distributes horizontally notes number 1,2,3,4; than vertically notes number 1,6,9,15,17. Everything is top/left aligned to these.
The same notes in a column-wise sort, specifying 7 rows:
Vertically distribute notes 15, 2,3,4,12,6,7; Horizontally distribute notes 4,9,16. Everything else is right/top aligned to these.
There are many options - choosing the right set to make this manageable, useful and nice-looking may take a while. I'm willing to play with it if you need help.