To clarify, the datadir key can be a relative path, that way environment directories are location independent: https://puppet.com/docs/puppet/7/hiera_config_yaml_5.html#built-in-backends so I think that eliminates the first use case?
I can see needing something like current environment path for the config_version case though. We ran into the same problem with static catalogs.