Create an array to record the results of rolling a 6-sided die. The user determines the number of rolls. Output the results of each roll and the sum of all rolls. The rolls should produce a random integer from 1-6.

To create an array to record the results of rolling a 6-sided die, you can follow these steps:

1. Ask the user for the number of rolls they want to perform.
2. Create an empty array to store the results of each roll.
3. Use a loop to generate random numbers between 1 and 6, representing the roll of the die.
4. Add each random number generated to the array.
5. Calculate the sum of all rolls using another loop.
6. Output the results of each roll and the sum of all rolls.

Here is a Python code example that implements the above steps:

```python
import random

# Step 1: Ask the user for the number of rolls
num_rolls = int(input("Enter the number of rolls: "))

# Step 2: Create an empty array to store the results of each roll
rolls = []

# Step 3: Use a loop to generate random numbers between 1 and 6
for _ in range(num_rolls):
roll = random.randint(1, 6)
rolls.append(roll)

# Step 4: Display the results of each roll
for i in range(num_rolls):
print(f"Roll {i+1}: {rolls[i]}")

# Step 5: Calculate the sum of all rolls
total_sum = sum(rolls)

# Step 6: Display the sum of all rolls
print(f"Sum of all rolls: {total_sum}")
```

By executing this code, the program will prompt the user to enter the number of rolls they want and then display the results of each roll along with the sum of all rolls.