How are prayers distributed among the souls in purgatory?
The short answer
That is God's domain. We can only pray for souls we believe may need prayer and trust God to apply the graces justly and mercifully.
How our prayers help the souls in purgatory belongs to God. Our part is to pray for those we think may need it and to trust that God will apply the graces won by those prayers with justice and mercy.