code: def get_as_array(self, index):
          
          if index == None:
              array = []
              for value in self:
                  array.append(value)
              return array
          else:
              value = self[index]
              return AnyValueArray.from_value(value)
docs: Converts array element into an AnyValueArray or returns empty AnyValueArray if conversion is not possible.
  
          :param index: an index of element to get.
  
          :return: AnyValueArray value of the element or empty AnyValueArray if conversion is not supported.