Direct URL to a template via plugin

This really isn’t the best use for wordpress. You are better off creating a custom post type called “profile” (see https://codex.wordpress.org/Function_Reference/register_post_type or use a plugin like PODS) and then the URL rewrites are all done for you. You can enable / disable the archive page so that domain.com/profile lists all profiles or not at all.

Then add post meta (see https://codex.wordpress.org/Function_Reference/add_post_meta) to your custom post type for extra fields you may want. I would recommend using ACF (Advanced Custom Fields) for this. ACF is a great tool for rapidly creating advanced meta fields for specific scenarios.

In any case, don’t waste your time custom cowboy-coding your own object when WordPress can do it already with alot less code. It’s less work for you in the long-run.