List of connected clients to server
The WiFiClient.h header and WifiClient.cpp source files are useful for reference.


  Is the best data structure a linked list?


Probably not here.  Possibly not ever.  It's a load of effort to implement, and won't give you any benefit.  Just create an array of them:

WiFiClient clients[5];


Then perhaps something like

WiFiClient newClient = server.available();
if (newClient) {
    // TODO: Check whether we have an existing connection from this IP
    // TODO: Get the first 'free' array index
    clients[firstFree] = newClient;
}



  How can I see if this client connected already (if there is already a connection to this ip) to avoid doubles?


Get the remote IP address of the new client

IPAddress = newClient.remoteIP();


Do the same with all the connected clients in your array* and compare them.  If you find a match, drop the connection

newClient.disconnect();


and, probably, don't put it in the array.


  How can I detect when they disconnect in order to delete them?


if (client[i].connected())


Lastly, how do we keep track of which items in our array are current active connections, and which aren't (either not yet used, or already disconnected).  You could do this several ways.  One would be to iterate through the array, checking whether the item is valid and connected:

// Returns -1 if no free slots
int firstFree() {
    for(int i=0 ; i&lt;5 ; ++i) {
        if(!clients[i] || !clients[i].connected()) return i;
    }
    return -1;
}


All code untested so you may find typos, but I believe it's basically correct.