Assuming a protocol listener pattern, you can simply add to obtain a subtree and then add in a loop the values, for example:
function DecoderListener:setParameter(widgetID, paramID, value)
if (type(value) == "table") then
local array_tree = self.subtree:add(paramID)
if #value >= 1 then
for i, value0 in ipairs(value) do
self:setArrayParameter(array_tree, value0, i)
end
end
end
end
function DecoderListener:setArrayParameter(array_tree, value, index)
local real_value = value:getValue()
-- this can handle int/float/string real values
array_tree:add(real_value)
end
This will result in folding elements in Wireshark with all the values you have speficied.