Loop to display random posts only if a custom field matches category

Something like this should be the query you want to run, it adds a condition to the page query that requires the value in “meta_field” to equal the current category’s title.

global $wp_query;
$args = array('meta_query' => array(
    array(
        'key' => 'meta_field',
        'value' => single_cat_title("", false),
        'compare' => '='
    )
  )
);

query_posts(array_merge($wp_query->query, $args));
// The Loop Goes Here //