A question for the experienced modders here (especially Spatz): would it be possible to create units with the following movement allowances, and how?
The short answer for most of these is "No."
The long answer is "Noooooooooooooo."
Okay, fine, I'll be more specific. The only controls we have over movement are very limited; the <CanMoveImpassable> promotion flag, for instance, simply tells the game that every terrain treated as Impassable is now possible to access, except that Ocean is handled separately thanks to the embarkation logic. Unfortunately, there's no easy way to override individual terrain types' accessibility to individual units, it's a pretty all-or-nothing thing. There are a half-dozen flags in the UnitPromotions file related to this sort of thing, some of which are nonfunctional, so you can try them out to see what each does.
But I don't remember any that'd let you move across one impassable terrain type but not others; Lakes and Mountains are both Land hexes with the Impassable flag, even though Lakes are a Terrain type and Mountains are a Plot type. (Yes, Lakes are a land type, not a sea type. Go figure.) Ice or Natural Wonders are a bit different, as you CAN make Features impassable to units without a given promotion (see the Forest limitation for early wheeled units), but giving that limitation to every unit except those few you want to use on Ice is not really a good solution.
While coastal and ocean waters ARE flagged as Impassable to land units, there are other factors involved. If a unit has the hovering promotion (like the helicopter) then it can move over shallow water but can't move into deep water. But if it has any of the three embarkation promotions (which everyone does once you research Optics) then it'll embark as soon as you move it into the shallow water, which means you either need to remove the embarkation (which screws up your ability to cross oceans) or give up on the shallow water part.
If you have total control over the map scripts, you can avoid this by removing deep water entirely, to where all water is shallow, and remove all embarkation, which'd allow hovering units to cross oceans. Of course, without deep water there's nothing stopping continents from contacting each other at the start of the game, so this'd only work for mods that completely overhaul the tech tree and are willing to accept that sort of change.
You can also override the UnitSetXY GameEvent to trigger an embarkation change (although you can't PREVENT one, which makes it easy to get stuck in an infinite loop), but that unfortunately doesn't work well in this case for various technical reasons. (Trust me, I spent a couple weeks trying to get this to override the embarkation correctly. It didn't go well.)
-------------
Now, failing that sort of massive overhaul, you CAN make a unit that can move on all terrain, including mountains, lakes, coast, and oceans, though. The trick there is to make it a SEA unit with the CanMoveImpassable flag, which allows it to move through oceans as if it were a naval unit, but can also move across land (since those are its "Impassable" types, there's no land-based counterpart to Embarkation, and apparently it has no problem with the Plot type transition in that direction). Yes, it works, and it only requires the Sea Domain, and does NOT require the Naval combat class, so your unit can still be of type "Armor" or "Mounted" or whatever and gain the usual promotions for that class. In my Alpha Centauri mod, I use this mechanism for the Vertol, Former, Nessus Worm, and Gravship, so I've had plenty of time to test it. No Lua mechanism is required, although I have one to make sure these units don't get assigned any embarkation promotions just to be sure.
This does have some issues:
> As sea units, these units can only be built in coastal cities. (This is the big one, especially if you want the unit to upgrade to something without this ability.)
> As sea units, they can stack directly with land-based combat units, without violating 1UPT, but cannot stack with other sea units of any kind. (This one has some major conceptual benefits; if your hovering unit is really powerful, it can be used to screen a more vulnerable unit.)
> They don't gain the benefits of land-only XP buildings (if any), but do benefit from sea-only XP buildings. (In my mod, the Barracks only adds 5 XP to sea and air units, and the Military Academy doesn't boost XP, but Harbors and Seaports each add +10XP to naval units. So it matters there.)
> They can be torpedoed by submarines. Conversely, if any land-based ranged units have that same "attack only in domain" limit for any reason (none in vanilla have it), then they CANNOT hit these units.
> They don't get the free promotions from the Great Lighthouse or those Commerce policies that boost naval units, and will be treated like their land-bound counterparts in this area, but they also don't gain any domain-specific boosts affecting land units.
> When an air or naval unit has taken the anti-Sea promotions, it hurts your unit more, while the corresponding anti-Land promotion doesn't affect them; this is generally a plus, but it's something to watch for.
> While they can fight naval units, which tend to have low combat ratings compared to land-bound counterparts, they're not actually Naval units and so don't trigger the "Naval Penalty" negative promotion bombers get. (You can change Naval Penalty to explicitly get a penalty against these units, if you really want to, but you might not WANT that sort of thing.)
> The unit's z-value for its graphics will change a bit as the unit comes out of the water (hovering a little higher over land hexes than sea ones), but that's not a bad thing in most cases. This really only matters if you're not adding a custom 3D model.
There are a few other quirks, but those are the big ones. And yes, the AI seems to use these units pretty well, although it won't send them out into deep water very often as those hexes aren't really defensible, so it won't think it's a good idea to stray too far from land unless it sees something out in the water worth attacking. One of the ways I've tweaked that is to give Atolls a defense bonus, which encourages the AI to move between those, which tends to help the number of these units that get moved offshore.