How do I create a redirect after using pathauto_node_update_alias()
I'd have a look at redirect_path_update and hook_path_update and maybe consider using node_save() instead of writing the paths directly.

If you're going to write them directly with pathauto_node_update_alias(), you may as well just write paths aliases and redirects directly to the database instead of wasting time node_load()ing all the nodes.