First you can make multiple GUI “item frames”, each representing a item from the table. Then just insert these into a UIListLayout with properties of your choice.
Here is a basic example:
UIListLayout = game.StarterGui.GUI.UIListLayout
ItemsOwnedArray = {1,4,8}
for x = 1,#ItemsOwnedArray,1 do --loop through owned items table
Name = trails[ItemsOwnedArrary[x]].Trail.Name
ItemTextLabel = Instance.new("TextLable") --create a textlabel that represents the item in your inventory GUI (you can use a frame containing whatever you want. I'm just using a textlabel as an example)
ItemTextLabel.Text = Name
ItemTextLabel.Parent = UIListLayout --let your UIListLayout do the work
end
This is just an example, but it shows the basics of how you would want to display your inventory.
Parent the frames inside the UIListLayout. The UIListLayout object only manipulates it’s children. If you wanted a to do as you mentioned, you can use UIListLayout’s cousin UIGridLayout instead.