Will any Shimano mountain bike shift cable set work with any Shimano mountain bike derailleurs and shifters?
Yes it will. The important factor for compatibility is the head of the cable that sits inside which will be the same. The cables will be significantly longer than you will need, so you'll have to cut them down to size. Use the old cable housing to determine the length of housing that you need (provided that it's been working well at the current length). Then thread the inner cable through to the derailleur and adjust your cable tension, then cut off the excess cable.