In reply to Spriyada29:
I don't understand why you are getting a compiler error. It should take the 32 LSBs of array[0] and assign them to text_i (Which I assume is 32 bits). It should be the same as
vif.wr_driv_cb.text_i<=array[0][31:0];
But since you are shifting left, you should be using the 32 MSBs
vif.wr_driv_cb.text_i<=array[0][511:480];
A simpler way of writing this would be
for(int i=511;i>0;i=i-32)
vif.wr_driv_cb.text_i<=array[0][i-:32];
Also, I assume there is some clock edge to space the assignments out