get taxonomies from terms

After some research I came up with the following

// Get the posts in that category with the required tag
$args = array(
    'post_type' => ['documents','news'],
    'fields'          => 'ids', // Only get post IDs
    'posts_per_page'  => -1,
    'tax_query'      => array(
        array(
            'taxonomy'  => 'forms',
            'field'     => 'slug',
            'terms'     => $symbol
        )
    )
);
$posts_array = get_posts( $args );
$categories = wp_get_object_terms($posts_array, ['sources','articles'], ['fields' => 'id=>name']);