I believe you will see many variations of whistle mountings on different steam locomotives. Some clearance related, others involving the valve lever arrangement and I'm sure some installations were the result of preferences of the chief mechanical officer or superintendant of motive power.
If I'm not mistaken, the PRR used a four-bolt mounting flange for both their Banshee whistle and the three-chime "passenger" whistle commonly found on the K4. I also seem to recall that the valve was integral with the whistle whereas some models used a separate whistle valve.
If at all possible, any appliances of a locomotive that do not protrude from the boiler are less prone to damage if they can be kept close to the boiler itself.
The K4 whistle shown above shows the four-bolt flange contoured to fit the OD of the steam dome, an integral shut off valve, the whistle operating valve and the sound chamber itself is threaded into this casting.
Some locomotives such as the NYC Niagara had their whistles mounted farther forward and used a relay valve to operate them. The Niagara boilers were so large in diameter that many of the appurtenances had to be mounted below the running board, on the front pilot or near the frame to allow for the clearances needed.
The K4 among other locomotives, included shields to try to divert the steam vapor away from the cab, especially in cold weather when the vapor would obscure visibility. All of the whistles the PRR used were made in their foundries.
There was an article about PRR whistles in a past issue of the PRRT&HS Keystone. I'll see if I can find it and report back if there are any specific details of interest.
Ed
on thr PRR K4's, any reason for the whistle to be reclining instead of straight up.