With steam locomotives, The minimum radius (in degrees of curvature) was likely specified in the specifications sent to the builder when ordering. On rebuilt steam locomotives, the minimum radius was calculated by Mechanical Engineers in the railroad's Mechanical Department.
With diesel locomotives, the builder does the calculations. If you ever see an operating manual for a locomotive, look on the page with all the length, height, and width statistics; there, you will find the minimum radius for the locomotive, not coupled.
You may be aware of the shared track over the Tehachapi Mountains in California (the line with the famous loop). Southern Pacific owned the track and dispatched it, while Santa Fe was a tennant via trackage rights. Santa Fe had two different sizes of 4-8-4s, and only used the smaller engines such as the 3751 between Barstow and Richmond, which included the Tehachapi segment, in passenger service. The Santa Fe Operating Department wanted to use some of the larger engines such as the 3771 Class or the 2900 Class, in order to run longer passenger trains, so the railroad studied the situation. They found that the larger 4-8-4's were -- on paper, at least -- just barely capable of negotiating curves in some of the Southern Pacific sidings, including the one at Cliff, which is actually on a narrow shelf between the mountain on one side and a deep gorge on the other side. Santa Fe did measurements on-site and found that the SP sidings actually contained curvature sharper than what the track chart indicated. Additionally, even if the track had matched the engineering chart, the tolerance would have been so close that it was risking derailment, and ANY Santa Fe derailment was always blamed on the Santa Fe by the Southern Pacific.
Santa Fe took the safe course and never ran any engine bigger than the 3751 on the Tehachapi segment. SP ran articulated 4-8-8-2s with smaller drivers and their own 4-8-4s of a different design.