Verizon and sprint models are CDMA. T-Mobile and AT&T are GSM. I am not sure on the S4 if the CDMA motherboards are interchangeable with the GSM ones. That being said:
a) Yes, you can interchange AT&T and T-Mobile or any other GSM carrier versions.
b) The phone's software will not be changed. A T-Mobile board in an AT&T phone will still say T-Mobile and have T-Mobile preloaded apps.
c) You cannot flash AT&T firmware completely on a T-Mobile board. The baseband cannot be changed (the component that selects LTE and GSM frequencies).
d) European GSM, Asian GSM, and US GSM all have different LTE frequencies.
e) You need to unlock the phones for one motherboard to work in another model.
In the case of a Galaxy S5, each model had different daughter boards (where the USB connects) that were specific to its model.