Repeating (with function repeat) array elements using a vector of numbers

I could have sworn there was a function like this was in StatsBase, but I can never remember its name. Its inverse, counts, lives there… did it move? Or is my memory foggy?