You could use late 2006 to 2009 C2D Mini innard inside. Just to have to fit the Mini drive slot to the one of the Cube. The Cube sound card is USB, so it will work on the Mini along with the Display with an ADC to DVI adapter.
All Gpu card for the iMac 2011 is mxm standard 3.0. So the 27 6970m mxm card is longer than the 27 6770 mxm card which seem to be the same module than in the 21,5. I'm pretty sure than the 6970m could work in 21,5 if you put the 21,5" 6770 heatsink on it. Aslo, to fit the 6970m into the 21,5" you must cut the half the hd retaining holder from the imac inner frame. The 6970m mxm module is one inch taller than the 6770 one. Also, you miust remove a part of the iMac inner frame rib which retain the hd with a dremel tool. The 6970m is like one inch longer than the 6770 module and this will make the 6970m card to interfer with the main hd. Changing the main hd for a SSD attached with two sided foam tape in the bottom if the iMac will correct this problem with the inner frame modification. Use the original heatsink gpu temp sensor to test if the machine work properly once reassembled. It cost the 6970m module 661-5968 (380-499$) plus SSD. Install SSDfancontrol to avoid hd fan blowing at full speed.
The late 2004 1.33ghz logic board is not compatible with the mid 2005 1.42ghz iBook and vis-versa. The logic boards of those iBook doesn't have same layout. The airport card is an "user" add in option on the late 2004 but not on the mid 2005 which is a standard feature with the bluetooth. By the way, I have on my workbench a mid 2005 iBook opened and the airport card seem to cause kernel panic. The KP is resolved when the airport card is unconnected to the logicboard. I'll try the plastic spacer trick which consist to put an little piece of plastic in between the airpot card and the retaining bracket which retaining it close to the logic board.