Added tests for arraylist
Common methods of Array and LinkedList moved