So you're finally here
Take a look at
oUF's classpower code, destrolock's soul shards behave exactly the same way.
In your case
mod will be
maxhp/3,
max will be 3 because it's just a number of elements, health bars.
The rest is almost the same, you can even leave bars' min/max values as 0 and 1 and never touch them again, because
cur value is adjusted anyway, you obv don't need that 0 check.
It's one update function to update all 3 or more status bars, it's perfectly scalable.