I always imagined that he takes his carapace out and heals around the metal that he implants into himself; I don't know if that's confirmed but the copper mind theorizes it is voidlight healing and "...his own, currently unknown, abilities"
the only citation for that is a chapter that I believe only indicates that the replacement is happening, but not how it happens, so I would have to reread that chapter when I got home.
I personally don't think Raysium doing the restoration would make sense, but the Valor metal maybe could have some sort of effect similar to this if burned; the nature of godmetals is kind of odd and I think kind of hard to predict what it will do, for example
Let me know what you think, I'd love to hear more on this topic