There are also ZF (don’t know the model off the top of my head, but it’s the most commonly available one) gearboxes that’ll bolt up to an m5x. Getrag 260 (m20) and 240 (m20) kinda bolt up (I think 1 or 2 bolts don’t line up), but are tilted 10*, so I’d avoid them. An M30 getrag 260 or an M10 getrag 240 wont bolt up at all.
There is also a getrag 250 that will work. (From early m50 e34s I believe)
An m20 flywheel can be made to work on an m5x, just check the clearance of the engine facing side (might need a machine) and the starter gear.
Are you after a single mass or dual mass flywheel?
TLDR: you want a getrag 220, 240 (m40) or a 250 (and technically a 420g as well) or a ZF from an e36.