Refactor bean visitor and data sinks to handle collections of beans