Custom post type within a subdirectory

When you register your post type, add the subdirectory to the has_archive argument, and as the slug argument of the rewrite argument:

$args = array(
    // ... other args removed for clarity
    'rewrite' => array( 'slug' => 'subdirectory/custom-post-type' ),
    'has_archive' => 'subdirectory/custom-post-type',
    // ...
);
register_post_type( 'your_cpt', $args );