I'm looking to create a WordPress secondary featured image. I started looking at a custom post type of attachment but is it possible to add a custom port type image on a regular post?
I don't want to use the many available plugins or a custom field.
Even a code only solution would use a custom field for this.
It's metadata about the post, so you use a custom field for it. That's what custom fields are.
Also, the code for your custom solution would live in a plugin, because that's where you put custom solutions.
So, as it stands, there is no answer to your question, because you placed restrictions on it that prevent any viable answer from being correct.