Mac -- HDMI to USB/Thunderbolt
If I understand you correctly, what you are looking for is a video capture device.

The way it works is video that is sent out from another source like a game console, DVD player, or even another computer it captured by this device and encoded to video.

One that a client of mine has used and seemed to like very much is this one by [Elgato][2]

Now, if you are looking to buy a Mac (I am assuming iMac because of the built in display) and using it as a target screen, it is important to know that while it is possible on some iMacs, it's not possible on all and only possible with other Mac hardware.  See Apple Support for full details.

If having an external display for other devices is a high priority, don't get an iMac - get a Mac Mini instead and get a high quality monitor with multiple inputs.