How to access $wp_query object from array of posts given by get_posts?

You can filter any WP query using pre_get_posts(). The (sometimes) tricky part is that it is run against all queries of WP so you need to pinpoint your query using WP conditionals (is_admin(), is_page(), is_archive(), etc… ).

You’ll find a few useful examples on that page, too.