index.php file for custom module
Drupal allows calls to .php files out of the box. Take a look at the .htaccess file and you will see that .php files will be handled just like any php application. 

So... just create your .php file and make sure you are including it at the appropriate path.

That all said, in D8 (or in D7 + elbow grease) you get some pretty powerful autoloader capabilities out of the box so ideally you could take advantage of that in your module.