Variable undefined but it is defined

Your problem is totally related with pure PHP, not WordPress. You must understand that includes DO NOT break the variable scope. So, the $curauth is only life in author_list.php file and, more specifically, only life inside the foreach($author_ids as $author) loop of that file.

In your page template you could use the_author_meta() to get the author meta fields of current post inside the loop instead of trying to access to a non-defined variable:

 <img src="https://wordpress.stackexchange.com/questions/139232/<?php the_author_meta("mainProfile'); ?>" class="no-award">
 <img src="https://wordpress.stackexchange.com/questions/139232/<?php the_author_meta("awardProfile'); ?>" class="award">

I also want to recommend you to use WP_User_Query cloass and methods in your author_list instead of write a plain SQL query. Also, you should remove the unnecesary <?php wp_reset_postdata(); ?>.