I'm using a MacBook Pro 15 inch retina (mid 2012) and I'm using a 27 inch iMac as an external display (connected using Thunderbolt) and another 23 inch display connected using HDMI.
I'm looking to replace the 23 inch display with a larger one and looking at my options. I've read a few posts on here and the general gist of what I'm reading is that it's possible to hook up a 4K display via HDMI running at 3840 x 2160 @ 30 Hz. My first question is if this would still apply when I keep the 27 inch iMac as a second external display. Does anyone have experience with this? It's working fine with my current setup, but the 23 inch display is only running at a 1920×1080 resolution.
Update 9/6
So I decided to give it a shot and went for a Samsung U32H850UMN display. I'm connecting it to the HDMI port of my Macbook and at the same time the iMac is still connected in TDM using the thunderbolt port. The Samsung display is running at 3840 x 2160 @ 30 Hz (as expected). The Macbook is running in clamshell mode. I'll keep an eye on the Macbook's temperature to make sure it doesn't get too hot. If it does I will just switch to just the Samsung monitor as my main display.
Best Answer
Officially these MBPs can support up to one HDMI display (at 1920x1080 pixels) while simultaneously connected to a Thunderbolt display (at 2560x1600 pixels), OR being connected to two Thunderbolt displays (both at 2560x1600 pixels).
However, unofficially you can exceed this. I'm not aware of anyone who has done exactly what you're wanting to do, but I have come across the following scenarios with other users:
It's not clear from your question whether you were wanting to use the MBP in clamshell mode, but the info above may give you enough to help you decide whether what you want to do is worth the risk.