Yep, Lua is so crappy that the stdlib doesn't provide anything like this. Repurposes the undocumented mp.format_table() function and moves it to mp.utils.