I’ve connected my two Dell 4K monitors to my late Retina 2015 iMac (27" in my case) via Thunderbolt 2 using both DisplayPort and Mini DisplayPort adapters. Both worked well and I expect this would be the simplest and cheapest route.
If you opt for HDMI, make sure that you’re using an adapter and monitor that supports 4K at 60Hz. I don’t recommend 4K at 30Hz; among other things, scrolling is not very smooth.