Inline template with Drupal 8 and Twig
Example 1. Basic inline template
$output[] = array(
'#type' => 'inline_template',
'#template' => '{{ yourvar }}',
'#context' => array(
'yourvar' => 'The Value',
),
);