Creates a Capture that calls callback on each element and stores values in capture (by default it is void).