How to access the dynamic array bit by bit ex bit [15:0]array[variable_length]

Hello every one there,
I have a dynamic array bit [15:0]data[variable_length_for_example_say10],

now I want to break the dynamic array into [15:0]data[0],[15:0]data[1],[15:0]data[2]…[15:0]data[10],

my goal is to send the dynamic array data bit by bit ie serially. first data[0] bits and the data[1] bits and so on.

could you help me how to access the dynamic array data in a loop;

Regards
Tanajirao

In reply to Tanajirao:

Hello Rao,
Please try with for loop and collect the individual array elements into another array. And create the sequence with it.

Thanks.

In reply to sunils:

Streaming operator makes it very simple to pack bytes.

bit serial_data [];
serial_data = { >> 8 {data} };

Thanks Sunil,
thanks Jlivermore