How to take parameters from a function and make them editable as attributes in a shortcode

Essentially you are asking how to pass parameters to a shortcode. This can be done with the function shortcode_atts, which has two required parameters: an array of valid parameters and their defaults, and the attributes of the shortcode that is being passed. You would use it like this:

add_shortcode( 'wpse232385_show_news', 'wpse232385_news_query' );

function wpse232385_news_query ($atts) {
$news_atts = shortcode_atts( 
    array(
      'posts_per_page' => 3,
      'category_name' => 'news' ),
    $atts );
$args = array(
    'posts_per_page' => $news_atts['posts_per_page'],
    'category_name' => $news_atts['category_name'],
);
$news_query = new WP_Query( $args );
...
}