Someone mentioned that Kakashi and Obito was shown around the time this masked guy fought the 4th.... What if after he fled away from the 4th and kind of stuck around the out skirts of the hidden leaf awhile, somehow saw the fight between Obito and the guy in the cave. Using Izagni somehow saved Obito's life and recreated part of his body using the same stuff Zetsu is made of. The masked guy could have been getting old talked Obito into taking his place (Obito feeling like he owes this guy for saving his life agrees\or is brainwashed lol). He's taught all the secrets and techniques and the learns the plan.. That would explain how he knows so much About Kakashi and the history of the Uchiha and SO6P
Lol just something I've been thinking about.