This type of behavior is documented in the WP_Query documentation. You can use a comma-separated list of category IDs instead of just one. For example (ripped right off the Codex page):
$query = new WP_Query( array( 'cat' => '2,6,17,38' ) );
With tags it’s a little different, but not too much so:
$query = new WP_Query( array( 'tag__in' => array( 37, 47 ) ) );
You might be able to use it like the cats with comma-separated ID’s, but I’m not sure off the top of my head without testing it and the docs are a little unclear on that point. But basically, with a few tweaks, if necessary, you could be using the same function and call it like:
<?php my_custom_loop_three_posts('33,44,55', array(12,13,14), 1); ?>
If using that example, just make sure you change
if ($tag) {
$args['tag'] = $tag;
}
to:
if ($tag) {
$args['tag__in'] = $tag;
}
Hopefully this makes sense. Docs should get you the rest of the way there.