As Michael said, use a function to return your desired var
Code:
Function ... returns Controls_Data[]
Also, arrays in df are zero-based [0..x].
You are using them as if one-based [1..x].

keep in mind that countarray/sizeofarray function will not return the real number of elements in your array.