Try to use Table like this :
Ped = {
{X = 2171.8740234375, Y= 1620.5299072266,Z= 999.97967529297, SkinID = 171, Interior = 2 , Dimension = 5},
{X = 2172.2761230469,Y= 1624.2602539063,Z= 999.97326660156,SkinID = 40,Interior = 1, Dimension = 5},
{X = 2171.7377929688,Y= 1618.6732177734,Z= 999.9765625,SkinID = 59,Interior = 10, Dimension = 5},
{X = 2172.2861328125,Y= 1616.7800292969,Z= 999.9765625,SkinID = 120 ,Interior = 15 , Dimension = 5},
}
for a,b in pairs(Ped) do
local Ped = createPed(b["skinID"], tostring(b["X"]), tostring(b["Y"]), tostring(b["Z"]))
etc ......