I think Madara can play many roles:
Madara = Tabura/or Tabuta (that old woman who awaken Bu) because both awaken the evil villain and got killed by him.
Kaguya+everything she had = Majun Bu. We noticed Rabbit escaped. This is just has having Evil Bu and nice BU. I am thinking the nine Bijus are the together the nice Bu, and the Rabbit that escaped is the evil Bu. Thus, Naruto and the nine Bijus will have a serious battle against the evil Rabit - leading to the end of the series.
Hagoromo = the boss of GenKai who fought against Bu: Thus I believe Hagoromo will be defeated by the Rabbit, proving he is not god, and then will be surpassed by Naruto.
Gamamaru = Genkai: he is the one who almost know everything. All his student are on the good side, and they always act as guardian of the earth. This tells me Naruto still has to learn some secret from Gamamaru or Hagoromo.