Most efficient way to randomize payload and length?

In reply to ben@SystemVerilog.us:

What I don’t understand is that how does the dynamic array allocate the size without using the new operator? How does randomizing data.size() allocate memory?