Adding custom image sizes and post types to a plugin or to a theme?

New image sizes need new rules in the stylesheet, so the best place for them is usually in the child theme. On the other hand: attachments are content, so the answer to your question depends on the specific use case. If you need these images in back-end only, or in a part of the front-end that is not affected by the default stylesheet (a slider, a light box), they can be placed in a plugin.

Custom post type registration belongs to plugins. See Where to put my code: plugin or functions.php?. The template for this is usually a theme job.