replacing the metal is the result you want but welding bits into the roofskin will make it warp badly therefore people do the whole skin
the other option is grind out what you can treat it and filler it but you get a couple of years max out of that, the roof sufferers from (apart from not being treated well from factory)the water from the sunroof but also the consensation, just like the outside the inside condensates up too but its every mm of it so rusts very quickly