code: def array_values(expr):
      
      if isinstance(expr, Array):
          return expr.get_elems(all_subs(expr._bounds))
      elif isinstance(expr, list):
          vals = [array_values(x) for x in expr]
          return flatten(vals)
      else:
          return [expr]
docs: Given an expression expr denoting a list of values, array_values(expr) 
         returns a list of values for that expression.