Many sections use one template: How do I get current section?
If I understand you right, you could just use the Entry Model which is automatically populated as entry if you call the Index. Entry Model objects have a method getSection() which returns the Section Model to which the Entry Model object belongs.

https://craftcms.com/docs/templating/entrymodel#getSection

Edit:
Okay I think I didn't understand you right. I think you get the error because no section is related to your index template and instead you call it directly. You actually don't want that, so rename your index file to _index in order to prevent direct call. If you call it directly, no entry object is populated and voilà: error.

You can probably achieve what you want by utilizing the way Craft's example website Happy Lager does it:


You have your channel sections with their handles a, b, c.... Entry Template of all is let's say whatever/_entry.
For every channel section you create a section of type single, the handles like aIndex, bIndex, cIndex.... All of these single sections point to whatever/_index as Entry Template but have different URIs, e.g. a for section aIndex.


When you hit craft.dev/a now, you get your index template whatever/_index populated with entry and entry.getSection() returns a section model of aIndex. Now you can get all entries of channel section a by using

{% set channel = entry.getSection().handle | replace("Index", "") %}
{% set entries = craft.entries.section(channel) %}


It is still kind of hacky because you have to name the section handles appropriately.