Output Array to Dynamic Text Field

Is there a better way to write this code? In a ‘for loop’ of some sort?

I want each item in the array to be displayed in a seperate textbox

slot0.text = inventory[0]
slot1.text = inventory[1]
slot2.text = inventory[2]
slot3.text = inventory[3]
slot4.text = inventory[4]
slot5.text = inventory[5]
slot6.text = inventory[6]
slot7.text = inventory[7]
slot8.text = inventory[8]
slot9.text = inventory[9]