Updated add_post_types_to_query function to output array correctly