Create linked list from an int array.