WIP: Arrays: added functional API

I love those method in JS, would be nice to have them in PHP as well. What do you think?