Feature Request: map() function for tables

Is there a reason that foreach() doesn’t work here? You could certainly make an equivalent of map implemented with foreach (unless I’m missing something)