0.9.7 will introduce a complete, object-oriented API for working with all MODx content and data without resorting to SQL. For instance:
<?php
$content= 'My new TV value...';
$tv= $modx->getObject('modTemplateVar', array ('name' => 'extra-content'));
$tv->setValue(12, $content);
?> ... would set the value of a TV named
extra-content to the value of $content for the document with id = 12.
Until then, it’s fairly easy to abstract the logic of doing this into a function or class you can include and make use of in a snippet. Then you can simply replace the calls to that function or the implementation of that function when the new API is available. I believe there are a couple of components in development for 0.9.6 that do exactly this...