In reply to rag123:
I think i got it working.
result = q.find(i) with (arr[i] == q[i]);
$display("1. find with i inside arr[i] : %p",result );
but i am not sure why the below one is not working, they both are same?
result = arr.find(i) with (arr[i] == q[i]);
$display("1. find with i inside arr[i] : %p",result );