You can use the vectors and masks for your purpose:
CMSEL, S, NODESINCONTACT
*get, nnodes, num, max
*dim, nmask, nnodes
*vget, nmask, NODE,,NSEL
*dim, reacarry, array, nnodes, 6
*vmask, nmask
*vget,reacarry(1,1),node,1,rf,fx
*vmask, nmask
*vget,reacarry(1,2),node,1,rf,fy
*vmask, nmask...