How to Put Values in Table at Assigned Spots

Hello,
I am currently trying to make a table that stores 9 values. It is important that each value is within an order in the table. When inserting values into a table you cannot skip any arrays. Say you have nothing in a table at the time of inserting the value, say I wanted that value to be in array 8, I could not put it there as I would need 7 more values in the table before being able to put that value in array 8. The reason I am not able to order them is because I am using a for loop with :GetChildren(), the GetChildren() function picks children at random. So say in the for loop it picked the 7th value of the children first, it would then go to insert the 7th value in the 7th array, but would fail as you can’t skip arrays within tables.

Example of what I tried

local shadowBall = workspace.Shadow
local lastPosTable = {}

script.Parent.ClickDetector.MouseClick:Connect(function()
	for i, v in pairs (shadowBall:GetChildren()) do
		local b = tonumber(string.sub(v.Name,4,4)) --Specifies which array
		table.insert(lastPosTable, b, shadowBall["Ray" .. b].WorldPosition)
		print(#lastPosTable)
	end
end)

I am looking for a way to make an ordered table where I can put values in any array I want no matter how many already existing arrays there are.

All I had to do was make it a dictionary instead of a table.