Have you confirmed that the SRAM shifter will work with the Shimano RD? I know there is some serendipitous Shimano/SRAM cross-compatibility for a few specific combos, just not sure which.
I know 11 and 12 speed Shimano MTB RDs have the same pull ratios, not sure about 10. Goatlinks or some other extended hangar can work, but it depends how much you are trying to stretch it. The other issue is that the 11 and 12 speed cassettes are slightly wider than the 10. Does the Deore M4100 have enough horizontal movement for that?
As far as chainline, I can tell you from my experience putting an 11 speed cassette (same width as 12) on an HG hub on a non-boost wheel that my 52mm chainline was far too outboard. I had to use a 7mm spacer to get it centered on the cassette. Much less than that and I was dropping the chain on the biggest cog if I backpedaled. The issue is that the 11-12 speed cassette is wider, and the extra width goes inboard. Plenty of people just run these with lousy chainlines, though.