Building circuit for n-relays using flip flops, is this the best solution?
You don't specifically mention shift registers in your question, but you used the shift-register tag, so I assume you've considered the option. For simplicity and expand-ability, I would go that route. Most shift register ICs can be daisy-chained, so you can connect as many together as you want and theoretically control as many relays as you'd like.

The outputs of a shift register probably can't source (or sink) enough current to drive the relay coil directly, so you just need to add a transistor for each relay. It might look something like this using MOSFETs:







simulate this circuit &ndash; Schematic created using CircuitLab

Shift register ICs come in both push-pull outputs and open-drain outputs. The example circuit above assumes push-pull type outputs. Make sure you choose the right type for your circuit.