Generalized select_helper implementation to support adding more select functions