If you use a string inverter not a emphase style microinverter, most of them are capable of running without the grid- Particularly if you add any sort of battery system.
These use a form of transfer switch like you’d use when you connect a generator- they disconnect the upstream.
You can run sans grid with Enphase (with their "system controller").