Android is still general purpose. I have Termux if I need to compile and run something. I can sideload APKs. I run Windows on desktop for newer games, but quite a few work on my Ubuntu laptop too.
To be fair, quite a few Android phones have unlockable bootloaders. You go to the manufacturer's website, download a utility or request a code, and you can then also install whichever OS you want.
In my experience realistically even if you can unlock the bootloader, the hardware is still so proprietary that you have no hope of ever installing an alternative OS it because by the time you reverse engineer it all the phone is already 10 years old.