Disconnect the DC-in cable by simultaneously depressing both locking arms and pulling its connector away from the socket on the logic board.
After both locking arms pass their retaining tabs, it is helpful to push them toward the left edge of your iMac with one hand while pulling on the body of the connector with your other hand.
Pull the SATA data cable straight up off the logic board.
The SATA connector on most iMacs tends to stick in its socket on the logic board. If you are having trouble disconnecting the SATA cable, insert a metal spudger or any other thin tool into the gap between the SATA connector and its socket and twist the spudger's shaft to safely separate the two pieces.
Pull the power button and CPU fan connectors straight up off the logic board, and pull the ambient temperature sensor cable toward the lower edge of the iMac.