Variable slicing of a fixed size packed array in systemverilog

In reply to sharvil111:

In my usecase even the right hand side needs to be a variable (which is random) so it can’t be macro. So any workaround? what shall i do?