Refactor functions to evaluate and create population using Array.map