You have a couple of options here.
the easiest way to do what you want would be to use the inlineScript() view helper and add it to the view in the bootstrap or directly in the layout script. The inlneScript() helper works the same way as the headScript() helper but puts the code in the markup. I sometimes use the inlineScript() helper to pass configuration data to audio and video players.
Alternatively you can build your own placeholder using your view helper and just initialize it in the bootstrap.
here is a simple example of a custom placeholder that renders menus:
The Bootstrap:
protected function _initMenus() {
//get view object
$view = $this->getResource('view');
//assign the id for the menus...
$view->mainMenuId = 4;
$view->adminMenuId = 5;
}
The layout:
<?php
$this->layout()->adminMenu = $this->action(
'render', 'menu', null, array('menu' => $this->adminMenuId))
?>
<div id="adminMenu">
<!-- Render the placeholder -->
<?php echo $this->layout()->adminMenu ?>
</div>
This placeholder just uses the action() helper to call a renderAction(), but what you can do with placeholders is pretty much limited by your imagination.