https://github.com/neo-global/printCoeFoam
Of course, from here, we'll need to put them all the numbers in their proper spots. I had tried something like this ages ago but IIRC I ended up storing up too much stuff in memory, trying to get a square shape. (Didn't finish it back then)