Chosen Solution

I know that you cannot connect any external source to the iMac 21.5" to use its display. But the 27" mini displayport offers input so that you can connect, for example, your PS3 to it and use it as a display. My question is this: How do you replace your mini displayport on an iMac 21.5" with the mini displayport of an iMac 27" and would it accept input?

It’s not related to the port itself rather than to the graphics card. The 27" iMac features an special card that accepts input from a mini displayport, something similar to a video capture device. Which, in turn, may be a solution for you.