Great question — answering as the UphillTech team:
Since you are purchasing a new mixing valve (faucet) you can look for one that is already PEX compatible. That is the hot and cold ports are already barbed for PEX pipe. The other option is to purchase the correct male or female barbed PEX fittings for your new valve. As stated by kreemoweet PEX is not recommended for plumbing to a tub spout or shower head. That should be copper or CPVC. Depending on what you choose for those, you will need the appropriate fitting for valve to pipe. (On a personal note, your piping does not look to be the "Swiss cheese" you feel it is. It looks in good shape and serviceable. I must refer to the old saying, "If it ain't broke, don't fix it.") Update to my...
Full answer by RMDman: https://diy.stackexchange.com/a/333433 (CC BY-SA 4.0).
Need it done for your business? UphillTech.