20 LEDs all ina row... Charlieplexing style! How to address each??

MasterErik:
what is the purpose of
uint8_t n = 0; n++

It's a relic from another application. The code that you pasted was originally intended for another post, which asked, "How to light 96 charlieplexed LEDs sequentially?" 96 LEDs requires 11 pins, and they will accommodate 110 LEDs. The variable n just counted LEDs, and reset the loop when the last one was lit. Without it, the loop would have continued, trying to illuminate LEDs that didn't exist. You don't need it, because you're using 20 LEDs, and 20 is the number of LEDs that can be served with 5 pins. When you light the 20th LED, all the loops terminate, and loop() starts over.

If you're going to continue to use the display wired exactly as it is for multiple projects, it would be handy to keep the array that maps pins to LEDs available, so you won't have to figure it out all over again. As to whether it merits creating a library, that's up to you.