Introduce some array and string helper functions

Introduce some convenience functions for common code patterns.
Merge pull request #114 from hugomg/foreach

Introduce some array and string helper functions