How can I create dynamic options based on the existing bundles from hook_drush_command()? I want to create dynamic options based on the entity types (returned by entity_get_info() function) inside the hook_drush_command(). There's no bootstrapped Drupal available at all, so the db_query() entity_get_info() functions aren't available. How can hook_drush_command() get site information? 

(The module is inside the ~/.drush/mymodule directory.)
This should work. Drush bootstraps Drupal before discovering module commands, so the first step is to make sure your commands are defined in a drush.services.yml file as usual.

From there, you should be able to define dynamic options using hook options. Since Drush bootstraps Drupal prior to discovering module commands, you should find that the Drupal site is always bootstrapped when your hook is called. You can inject the services you need through your drush.services.yml file.

EDIT When I read through the comments I thought that you said this was working when you were using hook_drush_command, so I answered as if you were asking how to convert and do the same thing in Drush 9. I don't remember the internals of the convoluted Drush 8 bootstrap very well, but I'm not sure this is possible in Drush 8.