Board Thread:Boruto Discussions/@comment-1458758-20171229124917/@comment-734582-20180101085852

Hawkeye2701 wrote: Just to add to what Killman said, during the Ao chapter, he says he owes his survival to Katasuke and that it was a miracle he survived at all, which would imply to me that he was a medic during the war. First i though he referred to prosthetics, but now that i think about it... yea it can only mean that he was a medic, who started to specialize in puppetry for prosthetic applications, and eventually branched out to other fields via his mechanical engineering.

Considering that Konoha possesses the 6 bodies of Pain, it makes sense that Katasuke gleaned a lot of technology from them (as a medical ninja, he could do surgery himself and as a puppet expert, he could interpret the results much better).