You can achieve this now; simply use $modx->setPlaceholder() and $modx->getPlaceholder() to manage an array of previous id’s. For instance, the code:
$modx->setPlaceholder('previous_ids', array_merge($modx->getPlaceholder('previous_ids'), array($modx->documentIdentifier)));
...could be used to add the current document ID to the list.
You can use the $modx->placeholders array to store anything, be it a string of HTML content, a PHP array, a PHP object, etc.