If you want to make check on adding new user you just have to run through the array and use username.equals(*)
on each existing user.
If you have an array with duplicate entries just run this algorythm for every user you have.
These are rough methods, there are a lot of optimizations for this problem.