Any way to get token owners held amount?

I’m trying to make it so every transaction has a tax% that gets distributed to all token holds based on their percentage of all held tokens.

Example:
Acct 1 has 10
Acct 2 has 5
Acct 3 has 5
Total held 20

Tax amount 10
1 gets 50% - 5
2 gets 25% - 2.5
3 gets 25% - 2.5

I have it working currently as percentage evenly distributed between all accounts that hold tokens. But is there a way to do it this way?

I didn’t understood really good your question. I suggest to take a look to actual trending tokens like safemoon etc. They already use this tokenomics