Random assignment can get a class activity, game or practice session started quickly. The team generator shuffles names and deals them into groups whose sizes differ by no more than one person.
A repeated number in a sequence is not always an error. It depends on the task: independent rolls can repeat, while a draw where each number is used once usually should not. Here is how to choose the right mode and avoid requesting more unique numbers than a range contains.