Here's where there's a lot of grinding to be done to the block to get the transaxle to fit. The block and oil pan have to be ground out about 15mm. There is not much left of the lip on the top of the oil pan, but there is enough to be taken up by RTV Silicone. Just put a lot more in that area when assembling the oil pan to the engine. Below are a few pics of how much has to be taken out. The transfer case can be ground a bit to leave a bit more of the block/oilpan intact.
Here's assembly of the transfercase/transaxle & engine as well as a fabricated bracket with drawing to connect the transfer case to the engine. This bracket may not be needed, but the 3S-FE had a bracket to connect the transfer case to the engine so figured I'd fabricate my own. You'll need to grind off the little nib on the engine to fit this bracket.
Exhaust Manifold Mods
The rear manifold collides with the transfer case so the front manifold has to be used on the rear cylinder bank. this positions it so that the exhaust header can route down under the transfer case with enough clearance using a 40NB long radius welding elbow. You could probably use a donut to get the tight bend radius as well. The manifold then needs a plug welded into it for the EGR assuming you're still going to use it.
Above also shows the engine mounted into the Rav4 subframe.