Actually, maximum overs allowed per players is decided by dividing total overs by 5.
E.g. in ODI allowed overs per players = Total overs / 5 = 50/5 = 10 overs. T20I = 20/5 = 4 overs.
Law 12.6 from ICC's Standard One Day International Match Playing Conditions PDF
Law 12.6 Number of Overs per Bowler
No bowler shall bowl more than 10 overs in an innings.
In a delayed or interrupted match where the overs are reduced for both
teams or for the team bowling second, no bowler may bowl more than
one-fifth of the total overs allowed.
Where the total overs is not divisible by 5, one additional over shall be allowed
to the maximum number per bowler necessary to make up the balance.
So in the interrupted matches, the same formula is used. E.g. suppose an ODI match is reduced to 40 overs then maximum allowed overs per player is 40/5 = 8. Another example: in case the match is reduced to 36 overs then maximum allowed overs per player is 35/5 = 7 and one player can bowl that remaining extra over i.e. total 7 + 1 = 8 overs.
Edit (regarding your another query):
If the match get started with 50 overs per side, after 22 overs gets bowled the match gets interrupted by rain with 4 bowlers used, by sharing 7,7,6,2 overs per bowler. Then the match get restarted with 32 overs per side. Now, how the overs will get divided?
In such situation the same rule is applied. E.g. here maximum overs per bowler is 30/5 = 6 plus any two bowlers can bowl remaining two overs each. I.e. two bowlers can bowl maximum 7 overs and others can bowl 6 overs each. Since
two three bowlers have already bowled their quota, they won't be able to bowl further. And captain have to bowl with additional bowler as remaining 10 overs can't be completed with two bowlers when one has already bowled 2 overs.