You can do this i guess ? im not sure if there will be problems if write this code
local dialogArray
if true then
dialogArray = math.random(1, 1000000)
end
print(dialogArray)
But if i understand you right u want the npc to say any number without tracking it right ? if its the case :
local function speak()
local dialouge = dialogArray[dialogcIncrement]
Chat:Chat(NPChead, math.random(1, 1000000))
end