What is the best way to assign pins to an LED Cube?
Well, learning bit manipulations and using three uint16_t (as 9 bits won't fit into uint8_t) to store state for a whole cube is much better. Then you hust have to setup timer ISR and each time it fires just display one "floor". The multiplexing can be done even in loop, but it's usualy flickering as you can't do almost perfect timing as in the ISR.

And for example, I was using two 2x4x4 segments to build up 4x4x4 cube and single MAX7219 to drive it, so I don't have to handle whole multiplexing and so.

My another aproach was using individually addressable LEDs like WS2812B, so I needed only one pin to drive it all. Or by using ARM and DMA transfers, I could drive 8 or 16 lines simultaneously.