Related to explanation

At 7:04 it is mentioned that at least two boxes will have the same values and if so what about the cases where there is no such good subarray.
Also, is this logic applicable for any value k other than N(size of the array)?

when we take mod with n the answer will be less than n always. If the size of the array is n then there will be at least one repetition.

what about any number other than n?

Then i think int O(n2) problem can be solved.