I haven't used that legacy library in quite a while, but after a quick review of the code in EE 4.3.6 (which should be the same as 5.0.x), I think you can return a string of error messages like so for a Control Panel flash message:
'errors' => ee()->form_validation->error_string()
That class and function lives in
system/ee/legacy/libraries/Form_validation.php and should return a carriage-returned string of errors you can use.
Remember that EE2 was running heavily on a version of CodeIgniter 2.x that EllisLab was maintaining, and in later versions of EE they stopped using that framework as a base. That framework is where the validation class originated, but now (in at least EE4 and EE5) they use a legacy library that has no dependencies on CodeIgniter anymore, so you can only use what lives in that legacy library file.
I think. Someone correct me if I'm wrong.