Pattern using Vb

I am Trying to create aPattern.gh (8.2 KB)
cross section Using polyline and trying to pattern it, Later I want to extrude it, this all using VB Component,
I am facing problem with the array, How to define loop and array could anyone Please help me?
I have uploaded my code in the Topic,

Thanks,

Anyone could you help me with how to set up array for above topic or could you direct me to the one?

thanks,

I no more program in VB but the logic will be to do that
Make a List of Extrusion
For i=1 to noX
For j=1 to noY
vect= (iDispX, jDispY, 0)
ExtrusionNew = previous extrusion
ExtrusionNew .Translate(vect)
Add to the list of the extrusion the ExtrusionNew
end for
end for