Please give us a description of what happened.
Setting a custom post type not to be indexed will remove it from the sitemap and add a "noindex" to all posts in the CPT.
The Yoast plugin has the option of treating the CPT Archive page separately, by letting you index the archive pages. However, selecting "Yes" in "Show CPT Archive in search results" will not add the CPT Archive to the sitemap, even if the pages do not get a "noindex".

Please describe what you expected to happen and why.
I expected that the CPT Archive page would appear in the sitemap.
How can we reproduce this behavior?
1.Create a Custom Post Type.
2.Go to SEO -> Search Appearance -> Content Types
3.Set the Custom Post Type not to appear in search engines.
4.Set the CPT Archive pages to appear in search engines.
5.Verify that the CPT Archive pages are not in the sitemap.
Technical info
Please give us a description of what happened.
Setting a custom post type not to be indexed will remove it from the sitemap and add a "noindex" to all posts in the CPT.
The Yoast plugin has the option of treating the CPT Archive page separately, by letting you index the archive pages. However, selecting "Yes" in "Show CPT Archive in search results" will not add the CPT Archive to the sitemap, even if the pages do not get a "noindex".
Please describe what you expected to happen and why.
I expected that the CPT Archive page would appear in the sitemap.
How can we reproduce this behavior?
1.Create a Custom Post Type.
2.Go to SEO -> Search Appearance -> Content Types
3.Set the Custom Post Type not to appear in search engines.
4.Set the CPT Archive pages to appear in search engines.
5.Verify that the CPT Archive pages are not in the sitemap.
Technical info
WordPress version: 4.9.8
Yoast SEO version: 9.0.1
Tested with theme: TwentySeventeen