Q:

See other tag but not his own

Is it possible to call all the objects in an array? Or is using the number the only way?
public void Update()
{
    Targetting ge = (Targetting)target.GetComponent("Targetting");
    enemies = ge.targets;

    float attackDistanceP = Vector3.Distance(target.transform.position, transform.position);

    foreach (Transform enemy in enemies)
    {
        float enemyDistance = Vector3.Distance(enemy.transform.position, transform.position);
        print(enemyDistance);
    }

    Debug.DrawLine(transform.position, waypointPosition, Color.black);

    if (attackDistanceP < 8)
        disableNow = true;

    if (attackDistanceP > 8)
        disableNow = false;

}

I want to call all of the objects in the enemies[] array. So that all of the enemies can see each other. But I don't want to them to see themselfs. Im using the GameObject.FindGameObjectsWithTag to fill the array in an other script.

A:

Some premature optimization for you:
using System.Collections.Generic;

public Transform trans;
Targetting ge;

void Start() {
    trans = transform;
    ge = target.GetComponent<Targetting>();
}

void Update () {
    enemies = ge.targets;

    float attackDistanceP = (target.trans.position - trans.position).sqrMagnitude; // save a square root

    foreach(Transform enemy in enemies){
        if (enemy == trans) continue; // skip me

        float enemyDistance = (enemy.trans.position - trans.position).sqrMagnitude; // save a square root
        print(enemyDistance);
    }

    Debug.DrawLine (trans.position, waypointPosition, Color.black);

    if(attackDistanceP < 64)
        disableNow = true;

    if(attackDistanceP > 64)
        disableNow = false;
}

