Run a collection function for each input value.