input: Write a python function to convert an array to a linked list and return the head of the linked list.
  assert arrayToLinkedList([1, 2, 3, 4]).data == 1
  assert arrayToLinkedList([1, 2, 3, 4]).next.data == 2
  assert arrayToLinkedList([5, 6, 7, 8]).data == 5
  assert arrayToLinkedList([5, 6, 7, 8]).next.next.next.data == 8
output: class ListNode:
      def __init__(self, data=0, next=None):
          self.data = data
          self.next = next
  
  def arrayToLinkedList(arr):
      if not arr:
          return None
      head = ListNode(arr[0])
      current = head
      for value in arr[1:]:
          current.next = ListNode(value)
          current = current.next
      return head