Wouldn't you love to work at iFixit? Not only do you get the vicarious thrill of tearing apart (gently...) thousands of dollars worth of electronics each day, but whenever something new arrives on the market you're one of the first people who gets to take it apart piece by piece. The company completed its teardown of the 21.5-inch Retina 4K iMac and there were some noticeable surprises that add to the repairability rating of the desktop computer.
No, there's not a RAM hatch on the back of the smaller iMac like there is on the 27-inch model, but iFixit found that the RAM is socketed and therefore could be upgraded by a user... a user with the right tools with the skills to rip apart an iMac, but still user upgradeable. In previous models, the RAM was soldered in, making it impossible to easily remove and replace. Now there are standard sockets that hold a pair of SO-DIMMs. You just need to remove the motherboard to get to the sockets, but this is better than soldered RAM.
The other big surprise? The Intel "Kaby Lake" architecture CPU isn't soldered to the motherboard either. Instead, it's seated in a standard LGA 1151 CPU socket, meaning that the CPU could be upgraded without too much fuss and bother.
In the comments, one reader noted that the replaceable CPU socket should mean that "any Kaby Lake 7th Series CPU" should work. So there you have it -- with the proper tools, lots of know-how, and the desire to upgrade a 21.5-inch Retina 4K iMac, it can be done.
By the way, iFixit gives the new iMac a 3 out of 10 repairability score, which is at least better than the 1 out of 10 given to most Mac laptops.