WordPress Theme Development: How to redirect templates the right way?

I don’t see any reason to redirect index.php. Let’s say you only have a Front Page, no blog or post types with archives. You would assign the Front Page in Settings -> Reading and WordPress will do the template redirect for you. At that point, nothing uses index.php and there’s no need to redirect it.

Maybe you install a plugin which create a post type and, by default, uses index.php to display its posts. You’ll want something to display instead of redirecting it otherwise you may spend time trying to figure out why the archive of this plugin is redirecting. Copy / Paste the page.php template and throw some baseline styles into it.

If you do have a post type archive or blog and want to keep the single posts but do not want an archive you can use the template_redirect hook to redirect the request:

/**
 * Redirect Archive Pages
 *
 * @return void
 */
function prefix_redirects() {

    if( is_post_type_archive( 'foobar' ) ) {
        wp_safe_redirect( home_url() );
        exit();
    }

}
add_action( 'template_redirect', 'prefix_redirects' );

The tools are there if you really need them but since index.php is the default display for post type archives it’s not something I would redirect but instead add some baseline styles to. You can always do more specific template overrides later if you need to.