You can hard-code it to PHP file, but you don’t have to edit the original theme files. Instead, you can create a child theme.
First, you create a folder and name it to your liking. For example my-theme
Then create a style.css
file inside that folder.
At the very top of that CSS file, you write this code:
/*
Theme Name: My Theme
Template: twentyseventeen
*/
Now you should be able to activate that theme from the administration area.
To override a theme file, you just need to create a file with the same name as the original one, inside your theme directory.