Overflowing indices in `select`
{'login': 'lvwerra', 'id': 8264887, 'node_id': 'MDQ6VXNlcjgyNjQ4ODc=', 'avatar_url': 'https://avatars.githubusercontent.com/u/8264887?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/lvwerra', 'html_url': 'https://github.com/lvwerra', 'followers_url': 'https://api.github.com/users/lvwerra/followers', 'following_url': 'https://api.github.com/users/lvwerra/following{/other_user}', 'gists_url': 'https://api.github.com/users/lvwerra/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/lvwerra/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/lvwerra/subscriptions', 'organizations_url': 'https://api.github.com/users/lvwerra/orgs', 'repos_url': 'https://api.github.com/users/lvwerra/repos', 'events_url': 'https://api.github.com/users/lvwerra/events{/privacy}', 'received_events_url': 'https://api.github.com/users/lvwerra/received_events', 'type': 'User', 'site_admin': False}
[{'id': 1935892857, 'node_id': 'MDU6TGFiZWwxOTM1ODkyODU3', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/bug', 'name': 'bug', 'color': 'd73a4a', 'default': True, 'description': "Something isn't working"}]
[]
Fixed on master (see https://github.com/huggingface/datasets/pull/3719). Awesome, I did not find that one! Thanks.
## Describe the bug
The `Dataset.select` function seems to accept indices that are larger than the dataset size and seems to effectively use `index %len(ds)`.

## Steps to reproduce the bug
```python
from datasets import Dataset

ds = Dataset.from_dict({"test": [1,2,3]})
ds = ds.select(range(5))

print(ds)
print()
print(ds["test"])
```
Result:
```python
Dataset({
    features: ['test'],
    num_rows: 5
})

[1, 2, 3, 1, 2]
```

This behaviour is not documented and can lead to unexpected behaviour when for example taking a sample larger than the dataset and thus creating a lot of duplicates.

## Expected results
It think this should throw an error or at least a very big warning:
```python
IndexError: Invalid key: 5 is out of bounds for size 3
```

## Environment info
- `datasets` version: 1.18.3
- Platform: macOS-12.0.1-x86_64-i386-64bit
- Python version: 3.9.10
- PyArrow version: 7.0.0
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/3754/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}