How are metal leads on through hole parts made?
They are punched out of thin strip, with a precise tool called a die. It's called a leadframe. Here is a US supplier of leadframes: 



The metal strips (top and bottom) join the individual leadframe parts together, and is left into place for the die bonding, wire bonding, and epoxy transfer molding steps. After that the transistor etc. is separated from the leadframe by shearing in another die. 

Leadframes, like anything, can be customized if you have enough money to pay for die costs. You would also have to pay additional NRE and probably place a substantial minimum order to get parts made with the custom leadframe. Certainly many thousands of dollars. 

Shaping the leads after the part is made is much less expensive and is commonly done, for example TO-92 parts may be supplied with formed leads on paper tape. Photo from this page