I understand that this cloning (copying) prevents changes to Y to effect on the original value of X.
What is the way to do so in Bash?
I'm not that familiar with PHP, but I'm guessing you want to avoid a situation like this in Python:
>>> a = [1, 2, 3]
>>> b = a
>>> b[1] = 9
>>> b
[1, 9, 3]
>>> a
[1, 9, 3]
Here, a list of three numbers is created, and after the assignment b = a, both names refer to the same list, so changing one changes the other.
A situation like that isn't really possible in Bash, since there are no implicit references, or pretty much any objects to speak of either. If you want a reference to a variable, you need to explicitly use declare -n/typeset -n to make a nameref variable, or use the ${!p} indirect reference.
Also, you can't even copy arrays just like that, by only referencing the array name, you need to do it element by element. If a is an array in Bash, $a just takes the element at index 0:
$ a=(1 2 3)
$ b=$a
$ declare -p b
declare -- b="1"
After the assignment, b is just a scalar (non-array) variable with the value 1.
You could copy an array like so:
$ a=(1 2 3)
$ b=("${a[@]}")
$ declare -p b
declare -a b=([0]="1" [1]="2" [2]="3")
That just copies the values and creates a new array with them. (Similar to b=[*a] in Python, and probably similar to PHP's clone, based on what I gathered.) Also as mentioned in the comments, it forgets the original indexes, which matters if the array is sparse or associative. See Making associative array based on another associative array