You can use ARRAY and STRUCT functions in dynamic expressions to construct dynamic arrays and dynamic structs. You use a dynamic port or a port selector as the complex function argument.
When you construct a dynamic struct, the number of elements of the struct changes based on the number of ports in the dynamic port or the port selector.
When you construct a dynamic array, the size of the array changes based on the number of ports in the dynamic port or the port selector.
For more information about complex functions, see
Complex Functions.