Is it possible: "getComponent<_array_element_$>"?

Am am new one in Unity C#, so probably my request is nonsence due to platform limitations.
Also, please excuse my english, I fear it will contant mistakes.

I know about GetComponent with variable script possible? - Questions & Answers - Unity Discussions but it seems like it doesn’t fit my needs (or I am too noob to understand how it does).

For some reasons I need to check GameObjects for some (nearly random) scripts and turn it on/off on raycast.
But when I tried to use some kind of that - it was a failure. GetComponent just do not want to use string variable as component name. How may I do this?

Actual (non-workable) listing:

using UnityEngine;
using System.Collections;

public class RaycastFunctionSwither : MonoBehaviour {

    public string components;
    public float distance;
    private string element;

    // Use this for initialization
    void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
        string subject;
        string old_subject;

        if (Input.GetKeyDown("e"))
        {//if user want to use it
            var hit = RaycastHit;
            var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            if (Physics.Raycast(ray, hit, distance))
            {//raycast gives new object, so old became an old one
                old_subject = subject;
                subject = hit.collider.gameObject.name;

                if (subject != old_subject)
                {
                    foreach (var Element in components)
                    {//check and turn off
                        if (old_subject.GetComponent(Element))
                        {
                            old_subject.GetComponent<element>().enable = false;
                        }
                    }
                    if (subject != null)
                    {//если объект != старый объект И объект != null
                        foreach (string element in components)
                        {//check and turn on
                            if (subject.GetComponent<element>)
                            {
                                subject.GetComponent<element>().enable = true;
                            }
                        }
                    }
                }
            }
        }
        else if (Input.GetKeyUp("e"))
        {   //check and turn off
            foreach (var element in components)
            {//check and turn off
                if (old_subject.GetComponent<element>)
                {
                    old_subject.GetComponent<element>().enable = false;
                }
            }
        }
    }
}

UPDATED ANSWER

using UnityEngine;
using System.Collections;

public class RaycastFunctionSwither : MonoBehaviour
{
	public string[] componentNames;
	public float distance;
	private Collider lastTarget ;

	// Update is called once per frame
	void Update ()
	{
		if (Input.GetKeyDown(KeyCode.E))
		{
			Collider hitCollider ;
			RaycastHit hit ;
			Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
			if (Physics.Raycast(ray, hit, distance))
			{
				hitCollider = hit.collider;

				// Check if target is the same as the old one
				if ( lastTarget.GetInstanceID() != hitCollider.GetInstanceID() )
				{
					EnableComponents( lastTarget.gameObject, false ) ;
					EnableComponents( hitCollider.gameObject, true ) ;
				}
			}
		}
		else if (Input.GetKeyUp(KeyCode.E) && lastTarget != null )
		{
			EnableComponents( lastTarget.gameObject, true ) ;
		}
	}
	
	private void EnableComponents( GameObject target, bool enable )
	{
		foreach (string name in componentNames)
		{
			MonoBehaviour monoBehaviour = target.GetComponent( name ) as MonoBehaviour ;
			if ( monoBehaviour != null )
				monoBehaviour.enabled = enable ;
		}
	}
}

Note : Be very careful with the leter case when adding the components name in the components array !


INITIAL ANSWER

First of all : components is not declared as an array

Then try to get the component using the string version of GetComponent :

private void EnableComponents( GameObject target, bool enable )
{
    foreach (var element in components)
    {
        MonoBehaviour monoBehaviour = target.GetComponent( element ) as MonoBehaviour ;
        if ( monoBehaviour != null )
               monoBehaviour.enabled = enable ;
    }
}

Then :

     // [...]
     else if (Input.GetKeyUp("e"))
     {
         EnableComponents( old_subject, false ) ;
     }