Implement source preferences
I think you should be able to define a preferred installation source in the settings, as well as ranked fallback options for the case the preferred one is not available. The same goes for the decision between user and system-wide installation.
Then, whenever you visit the Details page of an app, the source should automatically switch to the most preferred source. In case the app is already installed, it should switch to the installed version. This behavior would also prevent from people from installing several versions of the same if they don’t want to. In case they want to do that, though, they’d have to switch the source manually. But in general, people should not have to think about the source too much when they just want to install an app, so the default source preferences should be set to the best integrated option in the respective systems.