To set this up, go to Settings > Add Settings >More iOS > Network Usage Rules to set this up - it looks like this:
You could use this feature in conjunction with a cellular data usage policy as well! An example might be to set up a policy that checks to see when devices exceed a certain data usage threshold. If devices exceed the threshold, Network Usage Rules could become active to disable data usage by certain apps. See the guide above for more details.
Note - This payload does NOT require supervision or DEP enrollment
I'm not sure if there are plans to apply this to Android overall, or if it is (or will be) universally supported in Android for Work (as it is for iOS).
That being said - there are some Android apps that can be managed this way through app settings. For those apps that support it, you could make a configuration profile (SM>Settings>App Settings) to configure those apps to only work on wifi!
There is also the option in Device Owner mode to disable data roaming (Settings>More Android>Device Owner).