I recently bought a SIM card for my iPad for Germany, Austria, Italy and France, but was told it wouldn’t work in Switzerland because it is not a Schengen country (and it didn’t.)
Has nothing to do with being a Schengen country - it has to do with the country being part of the EU or European Economic Area (EEA) which is really where the "roam like at home" rules are in place. Plenty of other non-Schengen countries (like the UK, at least for now) are part of EU or EEA and enforce "roam like at home" rules, so you can use a SIM from one of the countries in another.
Switzerland is not part of the EU or EEA, so mobile operators don't HAVE to allow free roaming there. But some do anyway. Vodafone for example does seem to allow it in some cases - my Dutch Vodafone SIM includes free roaming in Switzerland, even though I've not tried to use it there - yet! Check with the individual provider and see if a specific SIM or plan works in Switzerland or not.