An A-Typical installation will have the following:
Solar Array to a Combiner (usually with each string to a breaker).
Many jurisdictions will also require a Master shutdown to disable the solar array.
VAC Inbound from Grid to AIO of course goes through a breaker to the AIO.
This is a Non-Export unit so no power out to Grid, nothing special is required as it can only pull Grid Power to charge batteries.
* It may be preferable to have the circuit from your mains go through a standard switch to a "plug outlet". Then wire a a plug onto the AIO VAC INPUT, so that 1) You can turn off the outlet by switch &/or 2) unplug it if required.
VAC Outboud from AIO.
Typically, the AC is wired to a Subpanel which in turn feeds the required circuits wired to it.
5000W ÷ 220V = 22.7A (round UP to 30A) is what that AIO can output and what it can support.
Wiring from Garage to Home would ALSO Require an equivalent circuit going back to house as you have presently. You could feed that wire directly from the AIO to a subpanel within your house entering the panel with a 40A Breaker.
YES, Have a Breaker between your AIO & any subpanel. As you are in the UK, you have full access to DINRAIL Boxes, Breakers etc which can really make it simpler.
WORD !!!
Do NOT EVER skimp on Fuses & Breakers and ensure your wire is correct for the loads (I generally suggest going up 1 level/grade above) what your "immediate" need it. A FACT WE ALL ENCOUNTER, we build what we think will do for our needs, 90% of the time we find ourselves upgrading within a year because we underestimate OR added more goodies that we gotta power. Always consider that ! Especially if you are running copper underground etc... You ONLY want to dig that trench "once"...