How do I split a vector value into a bunch of chunks and run code inside there

I need to split the newpos into 12x12x12 chunks and run the code inside the for loop.

local terrain = game.Workspace.Terrain
local region =,-300,-300),,300,300)) 
region = region:ExpandToGrid(4)
local material, occupancy = game.Workspace.Terrain:ReadVoxels(region, 4)
local size = material.Size
local LTM = game.ServerScriptService.LegacyTerrainManager
local RunService = game:GetService("RunService")
for x = 1, size.X do
	for y = 1, size.Y do
		for z = 1, size.Z do -- chunks
				local newpos =,y,z)
				print(x, y, z)

--print("Material at (", x, y, z, "): ", material[x][y][z])
--print("Occupancy at (", x, y, z, "): ", occupancy[x][y][z]) -- 1st val position, 2nd matieral
--local newpos =[x],occupancy[y],occupancy[z])```