How do I get an array of all entitytypes of a specific entity?
Do you mean "How do I get an array of all entities of a specific entity type?"

$ids = \Drupal::entityQuery($entity_type_id)-&gt;execute();


Because an entity can only be of one type, to get the id of the entity type:

$entity_type_id = $entity-&gt;getEntityTypeId();


Answer to the edited question: 

"How do I get an array of all bundle id's of a specific entity type?"

$bundles = \Drupal::entityManager()-&gt;getBundleInfo($entity_type_id);


Or all content types, which are bundles of the entity type node:

$content_types = \Drupal::entityManager()-&gt;getBundleInfo('node');


This function will be moved to it's own class before Drupal 9:

\Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo()


This is provided as a service:

$content_types = \Drupal::service('entity_type.bundle.info')-&gt;getBundleInfo('node');