I want to allocate a new array with the length N and fill it up by repeating a given array. The interface looks like this:
T[] repeat(T[] array, int n)