Your code isn’t very clear with respect to what you are trying to accomplish. I don’t see where resp is an array, so I’m not sure why you are using a foreach() construct.
Also, you shouldn’t use the uvm_rand_send_with macro (or any other uvm_send* macro). Try writing out your sequence using the appropriate APIs and it will probably be easier for you to understand what your issue is.
Note that ‘randc’ is only valid for a single class instance. The `uvm_send_* macros will create() a new object every time, which is why their usage isn’t recommended.