A flexible architecture for plasma magnetic control in tokamak reactors