I don't know if I am the first one with this theory, but I have been thinking that Tobirama might have summoned madara with Edo tensei. Brought him back to life as a Zombie at first.
I don't have much to support it and threre are counter examples like when you see that madara is not familiar with Edo tensei until kabuto.
But it would be such a twist and be so awesome
Tobirama might have summoned Madara for information, sexual disires ore somethin, and somehow Madara got free.
Only if Tobirama would not have been already summoned by Edo Tensei, Then there could even be a greater twist. The twist would be that Tobirama is infact Tobi. Stealing sharingan from madara after his death and then killing his own brother and obtaining his ability.