HTML in data of theme_table()
You can use FormattableMarkup to insert variables into html markup:

use Drupal\Component\Render\FormattableMarkup;

  'data' =&gt; new FormattableMarkup('&lt;b&gt;@bar&lt;/b&gt;', ['@bar' =&gt; $foo]);