in reply to Seek one liner for distributing an integer

Here goes,

$ perl -e'my ($n,$s) = @ARGV; my @foo = map { int($s/$n) + ($_ < $s % +$n) }0..$n-1; print "@foo"' 5 13 3 3 3 2 2$
Purely arithmetic, with a pun on the logical value of '<'.

Or more like the original problem,

@result{@array} = map { int($num/@array) + ($_ < $num % @array) } 0 .. $#array;

After Compline,
Zaxo