How to compare dynamic array in UVM using native compare and then print it?

Hi

I have an transaction object and in that i have an dynamic array.
this array is registered with factory using uvm_field_int

I know i can compare two objects using .compare, can i do the same for only portion of the object?

i mean can i do obj.arr.compare(arr)? somehow it is not working for me.

and on top of that i want to print it, if i give obj.sprint() it works but if i give obj.arr.sprint() it does not.

am i missing something basic ? is there no alternative than running a for loop?

Thanks in advance :)