SRAM kept the same cable pull ratio of 1:1 across a lot of their group sets and speeds. Look for exact actuation.
These are interchangeable but like you said, match the shifter to the cassette.
Shimano cassettes are the same spacing as sram so those are interchangeable
so will the mech work with any speeds, as long as its the same brand? Does the casssette need to be sram too?