A generic iterator method that can iterate over an array or an object, and run a callback function on each.