Harry/Ron/Hermione
That's an interesting thought. What sort of spell could even do that? And if it was a spell, why these specific people? Most of them are connected to you specifically Harry, but then we have outliers like Savannah, Myron, and Kirley. Though they're related to each other. Maybe Savannah because of her connection to your children? But if the plan was to bring back wizards you'd think we'd have chosen more generic diversity, and also more women. But maybe we didn't choose, and the spell is what allowed the castle to start making choices? Is the castle sentient enough to take the magic we give it and build on that? We know it has a sense of what it wants, hence the temper tantrum when Glenda left.