to drop a dmax allison in a 4wd square is quite the task i know of about 3 that have been done. the issue isnt the engine but the trans and mating it to a np205 transfer case. the easiest way ive found is to use a ford dana 60 from a 78-79 hd ford. prepare to get your colon tickled by someones peter when you purchase this. they go for about 1k or more. with the ford axle you can take out the 205 and use the tc from the newer truck. then all you need is custom length drive shafts and a custom trans crossmember set up. the left side drop also keeps cleareance for the exhuast like the modern trucks. your other option is to use to take a np205 completely apart change the input to a 29 spline unit with a coupler and have a spacer/clock ring mount made by a machine shop. however using a 205 causes issues when dropping it in 4 lo and sends the truck into limp modes. there is a work around by using a switch when it goes into 4 lo and some kind of tunning. i dont know alot about it since i feel the ford dana is a better option. also using right side drop will require being creative with the exhaust.
now on to the wiring. these things are nightmares. worse than a ls ever thought about. the simplest option is using a lb7 or lly and the 5 speed ally and forget about cruise and tow haul. then its just gutting the harness down to the parts needed to control the engine and trans. however if you want to have it like a modern truck with cruise tow haul or run the latter 6 speed alli and use its tap shift you have a bigger task. tow haul and cruise require the bcm from the new truck. all you would do is wire it and that be the only functions it would control. with a 6 speed trans you gotta take it some steps further. you need some up and down button wired in to use the tap shift. you could possible use the shifter off the new truck on the old column or to be more period looking use a 10 up dodge one. you would have to marry some wires up but they all should fit into the pin on the column. now your tap shift will work but you wont have indicator to tell you what gear its in. so either guess or you can do one of four things. use something like a readout like quads stealth 2 and it will tell you what gear you top out end up in, hack up your dash to use the new cluster, gut down a cluster till its nothing but a chip board and ribbon cable then mount the dic off it onto your dash somewheres, or it may be possible to customize a 07 up cluster so the the speedo and tach fit into the openings of the oem dash ive not measured but i think they are close in size of the openings. for the last you would have to cut the board apart in sections and use ribbon cables and may have to make mix and match of oem and aftermarket gauges that look like the oem ones it would be a think outside the box but it would be better than hacking up a that oem dash to me.