To my knowledge I don't think BMW has changed their bolt pattern on their bellhouses for damn near 20 years now.
The BMW Z4 at least used to run the M54 before it switched to the N52, however the transmission never really changed (who manufactured it might have debateably). This means your manual transmission options are pretty open.
If you wanted a 5 speed your best bet is to find one from a 328I or E36 M3. They are cheap, all over the place, and very smooth. You could get one out of an E36 325I, but it's not as good of a transmission.
6 speeds you pretty much have 2 options.
You can get the Getreg 217 out of a BMW E46 330I ZHP, a Z4 3.0i/is, or any of the E90's (however these are hard to find with most a-holes opting for auto's)
You can also get the Getreg 226 out of an E46 M3. It's your strongest bet.
The motor you have is making about 230 at the crank, however the same engine in an X3/5 makes about 30 more horsepower, but I don't know what the difference is.
It's a really light engine though, and would suit a Z perfectly as far as I can tell.
EDIT: Oh yeah, and if you're going to use the factor EMS for the Bimmer engine, you'll need the key from that specific car, and the ignition switch as well to deal with the ews.
Either that or you'll have to run a standalone ems.