Sadly Apple does not offer any means to alter the stand after purchase unlike their older model.
It's not a trivial task to swap out if you can get the needed parts (thats a big if). It will require complete disassembly of your system!
Review this IFIXIT guide to get an idea how far you have to go: iMac Intel 27" Retina 5K Display Logic Board Replacement. Be aware just getting the display off is a bear! And if you've never have done one its quite easy to damage which would be a very expensive opps!
Frankly, if you really want to go with a VESA mount look at some of the fixtures you can mount to the foot assembly like this one: NewerTech
NuMount VESA Adapter for iMac.
If you really want the slimmer Apple mount you'll need to buy a new system and sell your old system. I wouldn't recommend modifying yours given the risks and the difficulty in getting all of the needed parts.