java file for creating arrays with no repeats and no values matching its position