how to replace hostnames on certain external links?

If the links are coming from the main content areas, you could create a hook which acts against this “content” output. In your themes functions.php file, you could try something like:

add_filter('the_content', 'the_url_filter_function_name', 30);
function the_url_filter_function_name($content) {
    return str_replace('bad-url.com', 'good-url.com', $content);
}

If the URLs you are looking to modify are being stored and output’d via different mechanisms, you will probably be able to locate hooks for them which could modify their content on-the-fly also. Abstracting this into an external configuration is another exercise in using config variables.