to convert from a.40 to 9 mm you will need new mags in 9mm for reliability and a new barrel.. thats it.. if you can find a stock M&P 9mm barrel that will work as the outside diameter of the forty and nine are the same, the bore size is just different, if not a good barrel from storm lake will work as well.
I believe the .45 has a slightly larger frame than the 9mm, .40S&W, .357SIG variants. The head diameter would also be a big change in that case. I do not think it can be converted as easily... but thats not to say it totally cannot be done. The 9mm, .40S&W, .357SIG variants are easily interchangable.