You only need to do this in your element routine where you have both xl(ndm,nen) and ul(ndf,nen,*). To obtain 'nen' you need to include 'cdata.h'. It is best if you add an array to store the coordinates at t_n. Then set this to:
xn(1:ndm,1:nen) = xl(1:ndm,1:nen) + ul(1:ndm,1:nen,1) - ul(1:ndm,1:nen,2)
You use the 'xn(:,:)' array for your configuration at t_n.
The array ul(:,:,1) has the current solution at t_n+1 and the array ul(:,:,2) has the change in displacement between t_n and t_n+1, thus, the difference of the two displacement arrays will give you displacements at t_n.
Do not make changes outside an element routine, that could cause serious problems.