I've knocked out plenty of studs....I jam a piece of 2x4 behind the flange and hit the stud with a 3lb sledge...they normally come out very easy...spray them with a little PB Blaster or WD40 first.....There is plenty of room to get the stud out and the new one in.
I use an impact gun to press the new one in. Put it in place, use a nice thick washer and then a lug nut with the flat side towards the flange....make sure to oil the lug well first and don't over do it. Watch the lug from the back side of the flange and once it's flush...your done. Note that this creates some heat, so use the oil and don't use the "pressing lug" for more than 3 studs to avoid damaging the threads.....throw those lugs away when done.
My custom rims have a thick mounting flange because they are aluminum, I've had the same rims on three cars and I've done them all the same and put in longer studs. Just make sure you get the correct studs...you'd be surprised at how many sizes they offer. If you get ones that are to big your going to be killing yourself and the studs to get them in without damaging the threads.
And I guess the real question here is....How did you bend the studs in the first place?.....lol
My 2 cents
Steve