Modified functions for intensity of selection mapping for better type
handling and handling of arrays