[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
Avoided constant udf expression re-evaluation

Author: Venkata Ramana G <ramana.gollamudi@huawei.com>
In HiveQuerySuite,  "constant array" testcase was failing
SELECT sort_array(
     sort_array(
       array("hadoop distributed file system",
             "enterprise databases", "hadoop map-reduce")))
   FROM src LIMIT 1

[info] - constant array *** FAILED *** (596 milliseconds)
[info]   Failed to execute query using catalyst:
[info]   Error: java.lang.String cannot be cast to org.apache.hadoop.io.Text