There were a couple of 27" 2015 iMacs:
- iMac (Retina 5K, 27-inch, Mid 2015).
- iMac (Retina 5K, 27-inch, Late 2015).
Both had Thunderbolt 2 ports (with Mini DIsplayPort connectors) that doubled as Mini DisplayPorts. Although their display support differed, even the earlier one could drive a display with 3840x2160 pixels.
I'm not sure that Apple Thunderbolt 3-to-2 adapter will work for this application. It only supports Thunderbolt. So if you plug it into a TB3-equipped Mac, the TB2 side will not present an unwrapped DisplayPort signal to a monitor. Likewise, I suspect that if you plug it into a TB2-equipped Mac, the TB3 side will not present a USB-C (DisplayPort) signal to a monitor.
I believe a more reliable and less expensive way of connecting that monitor would be:
- A Mini DisplayPort to DisplayPort cable, run from one of the Mac's Thunderbolt 2 (Mini DisplayPort) ports to the Dell U2723QE's DisplayPort (in) port (port 4 on page 12 of the monitor manual). (Don't use the monitor's other DisplayPort (the one that's there for output when daisy-chaining monitors).)
- A USB-A to USB-C, run from one of the Mac's USB-A (USB 3.0) ports to the monitor's USB-C upstream port – the one shown as port 8 on page 12 of the monitor manual. (I believe you'd only use port 5 if you were hooking up the monitor to a computer that could provide DisplayPort + USB over the USB-C cable.)
The monitor comes with a DisplayPort-to-DisplayPort cable, and a USB-C to USB-C one, so it's possible that you could get adapters for the Mac end of each cable, instead of replacement cables.