You can use the MATLAB latex() method to convert the MATLAB Array into latex table as follows:
B=["Hello" "2" "3"; "yes" "5" "6"; "Sam" "8" "John"];
latex_table = latex(sym(B))
If you intend to store "Hello World" inside the 1st element of the MATLAB array, it will yield an error while creating Latex table as it doesn't allow the same. For that, you can use the str2sym() method as follows:
B=[str2sym("Hello world") "2" "3"; "yes" "5" "6"; "Sam" "8" "John"];
latex_table = latex(sym(B))
Hope this helps!