Mechanically, easy.
Electronically.....well, as they say, "if you have to ask." AFAIK, all the 5EAT cars had immobilizers, which means the TCU is looking for a CAN signal from other modules, which will be virtually impossible to make happy outside the car for which it was designed. Probably would require a standalone auto trans controller (which I've never seen done on a Subaru transmission, those controllers generally are not designed to control AWD as well). And quite a bit of custom programming.
4EAT is a decent trans. I don't like the standard AWD system, but there are models with the VTD on the 4EAT.