How do I generate all combinations of integers from zero to value

I need to generate one combination at a time, ie I have a variable of array length and the number to which the combinations will be generated.For example, an array of length 3 and number 5, ie the following sequences should be generated:
and so on until [4,4,4]

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum