If there were approved plans and permit, shouldn't be a big issue but they would have to carefully examine the plans.
Getting someone to design it and create plans would be the difficulty.
Under 125 Voc, I think I could accomplish that with a pair of interlocked Square D QO branch circuit breakers.
Higher voltage, you need a suitably rated transfer switch. Disconnect switches are easier to come by. The UL listed transfer switches I know of will cost more than the PV panels they disconnect (!) i.e. cheaper just buy more panels.
My redneck engineering approach would be a suitably rated disconnect (with cover that can only be opened when off), and touch-safe connectors inside.
Best approach is make your MPPT/battery system grid tied and assign some panels to it.