How to get drush to list ONLY parent folders on module list command?
You are looking for the pm-projectinfo command.  See: http://drushcommands.com/drush-8x/pm/pm-projectinfo/

In Drupal, "projects" contain "extensions". An "extension" can be either a module or a theme.  drush pm-list will show a list of modules and themes; drush pm-projectinfo shows a list of projects.

UPDATE: If you want to convert an existing site into a reproducible, buildable script, you might also be interested in using Composer.  See https://github.com/drupal-composer/drupal-project and https://www.drupal.org/project/composer_generate