Store posts in an array?

Hi again,

What's the best way to store posts in a variable and be able to use wordpress functions outside the loop?

This is what my query looks like:

<?php $args = array('tax_query' => array(array('taxonomy' => 'post-status','field' => 'slug','terms' => array ('post-status-published'))));$query = new WP_Query( $args ); $groupa = array(); $groupb = array(); $groupc = array(); $groupd = array(); ?>
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>

<?php endwhile; wp_reset_postdata(); endif; ?>

I was thinking of doing something like "if(has_category('group-a')) = $groupa" inside the query and then use $groupa outside the loop. Also, how do I use wordpress functions like thumbnail(),the_content(),the_title(),etc. outside the loop?

Thanks again,