flip flop it or 4051 it?

I would go with 74AC574, can source 24mA to drive the anode, use 5 of them daisy chained, wrap Q0 output to Q1 input, 1 to 2,2 to 3, etc so it acts like a shift register for you.

Then a hefty enough transistor to sink 24 * 20mA of current (480mA) on the outputs of a shift register, or arduino pins assuming a bigger chip like '1284 or a '2560.
http://www.fairchildsemi.com/ds/PN/PN2222A.pdf
2N2222 needs lot of base current to pass 500mA of collector current
IC = 500mA, IB = 50mA
I'd find a better part, like an N-channel MOSFET, will also run cooler and last longer.

Could also look into 3 high current shift registers such as tpic6b595

if you can follow these limitations so you don't burn it up:

Pulsed source-to-drain diode anode current (see Note 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 A
Pulsed drain current, each output, all outputs on, ID, TC = 25°C (see Note 3) . . . . . . . . . . . . . . . . . . . 500 mA
Continuous drain current, each output, all outputs on, ID, TC = 25°C . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 mA
Peak drain current single output, IDM,TC = 25°C (see Note 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 mA

Note 3. Pulse duration ? 100 ?s and duty cycle ? 2%.