Refactor process of collecting data from each type
Refactor process of collecting data from each type

Summary: Pure refactor to make it easier to do stuff for each type, since we seem to be doing that a fair amount and will be doing it again with cpp.type.

Reviewed By: yfeldblum

Differential Revision: D6173947

fbshipit-source-id: 872c065870d7d2e96a778714b8026106cc880d65

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift