创建一个包含10个元素的数组，其中每个元素都是介于1到50之间的随机整数。
Here's the code in Python to create an array of 10 randomly generated integers between 1 and 50:

```python
import random

my_array = []

for i in range(10):
    my_array.append(random.randint(1, 50))

print(my_array)
```