All of the 1x MTB derailleurs have about the same leverage, and they all can share the same cassettes. So all you need to do about speeds is match shifter to cassette. You can look at production bikes for examples. But pay attention, @
Retro Grouch above is right about capacity. If you want to use a 42t cassette you need a big derailleur. An old Nx10-speed derailleur will likely peak out at 36 or 40.
Shimano SLX M7000 is a great deal.