In your init.sqs, initialize an empty global array like this:
Pos_tracker_array = [];
The loop that runs during the mission would add player positions via a line like this:
Pos_tracker_array = Pos_tracker_array + getpos player;
Each element in the global array would be a position (note that a position is also an array, so the global array is an array of arrays).
Note that you need an if condition around this that tests distance between current player position and last recorded position (as mentioned earlier) to prevent recording too many positions.
On whatever condition you desire, a trigger could fire that would then read that array, and place a marker at every position contained in the array.
With a little sleep delay in the loop, and forcing to map view, the player could see the markers paint in order (nice little player progress animation effect). Same sort of technique could be used as a tracking device. Say a character is being tracked every time he uses his cell phone for instance...