wp_enqueue_script outside functions.php file?

I prefer to enqueue it to the get_template_part_{$slug} action to keep all the scripts in one place & more organized. But you can do it either way you like