1. Find all spawned coin and coin-like NPCs.
2. Turn them into Rinkas.
3. Align them to the 32x32 grid.
It's structured as an API so you can put it in Lua Scripts Lib and load the API into whatever level you feel like messing around in.
Here's what it looks like: