Older iMacs had GPU soldered to the motherboard. Newer ones use the MXM interface and are replaceable. If you can find a vendor that will sell mobile graphics to end users, please let me know.
The CPU is mounted in a ZIF socket, so you can remove and replace the CPU. If you replace, the CPU with a different one, it's a crapshoot as to whether or not it will work. If you try it, please let use know.