Render array in controller response without surrounding theme I have custom controller in which I would like to take a render array (as such returned by EntityViewBuilderInterface::view) and return it as HTML without anything additional page theming wrapping it. I'm using this with a custom ajax call and would like to fetch html fragments to dynamically render on the page. Is this possible?
There are two ways.

One is, you render it yourself into a string, then build a Response object with it and return it. Drupal won't alter/touch a Response object and return its content as-is.

Second, since you mention ajax, Drupal actually has a built-in mechanism for its own ajax command system. If you pass ?_wrapper_format=drupal_ajax to the request, it will automatically transform it into ajax commands that will take care of not only the html content but also contained assets like css/js and drupal settings that are required to correctly display that HTML.

I don't really know in detail how the JS part works, but it basically all happens in ajax.js, for example in Drupal.Ajax.success, which then triggers the commands defined in Drupal.AjaxCommands (which can be extended), so you could write a more or less generic implementation of dealing with that response.