When you’re building a WordPress site some things belong in themes and some in plugins. Usually anything having to do with display is in the theme and anything that might be used elsewhere should be in a plugin. As an example: take a custom post type and a custom meta box. Those are things that your end user will probably want to keep around after a theme change. They both belong in a plugin. Because you’re a really good WordPress dev, you don’t use magic strings and instead built a nice set of wrapper methods to fetch those custom meta values for your post type. Maybe as a nice object that someone can pass a post ID into and use.