How do I make variables available for all blocks in a page?
Yes this can be done in hook_preprocess_block.

inc file:

function get_some_vars() {
  static $vars = array();

  if (empty($vars)) {
    $vars['foo'] = expensive_function_1();
    $vars['bar'] = expensive_function_2();
  }

  return $vars;
}


.module/template.php file:

function MYMODULE_preprocess_block(&amp;$vars) {
  require_once 'my.inc'; // or module_load_include, depends where your code is

  $vars += get_some_vars();
}


It's not the exact desired workflow you described in the question, but it has a similar effect; require_once will only include the file once per request, and the variables will only be prepared once per request. There is the function call overhead, but given that themes don't have the concept of always-available-vars (as far as I know each theme call is an isolated instance as it were), I think this is the closest you'll get without patching the theme system.