[SPARK-3891][SQL] Add array support to percentile, percentile_approx and constant inspectors support

Supported passing array to percentile and percentile_approx UDAFs
To support percentile_approx,  constant inspectors are supported for GenericUDAF
Constant folding support added to CreateArray expression

Author: Venkata Ramana G <ramana.gollamudi@huawei.com>
This test case only `ReadOnly` for metastore/data, removing the `TestHive.reset()` seems reasonable. But It's quite strange the next test case will fail with call stack below:
```
[info] - spark sql udf test that returns a struct (26 seconds, 855 milliseconds)
[info] - hive struct udf (443 milliseconds)
[info] - SPARK-2693 udaf aggregates test (2 seconds, 355 milliseconds)
[info] - Generic UDAF aggregates *** FAILED *** (586 milliseconds)
[info]   org.apache.hadoop.hive.ql.exec.UDFArgumentTypeException: The second argument must be a constant, but array<double> was passed instead.
[info]   at org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.getEvaluator(GenericUDAFPercentileApprox.java:146)
[info]   at org.apache.spark.sql.hive.HiveGenericUdaf.objectInspector$lzycompute(hiveUdfs.scala:204)
[info]   at org.apache.spark.sql.hive.HiveGenericUdaf.objectInspector(hiveUdfs.scala:202)
[info]   at org.apache.spark.sql.hive.HiveGenericUdaf.dataType(hiveUdfs.scala:211)
[info]   at org.apache.spark.sql.catalyst.expressions.Alias.toAttribute(namedExpressions.scala:104)
[info]   at org.apache.spark.sql.catalyst.plans.logical.Aggregate$$anonfun$output$6.apply(basicOperators.scala:143)
[info]   at org.apache.spark.sql.catalyst.plans.logical.Aggregate$$anonfun$output$6.apply(basicOperators.scala:143)
[info]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
[info]   at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)

```