convert test array to a linked list