Here is my Power Automate flow –


TheIndex is initialized to 0 and Alpha to 1 and each is then incremented in Apply to Each step below.

FilterArray looks as expected.

Get-Name works as expected and return True for the array element body('FilterArray')[variables('TheIndex')]
Set Name does not work. Name is set to body('FilterArray')[variables('Alpha')] rather than the value of body('FilterArray')[variables('Alpha')]

The results are:


Excel results: These are the various iterations I tried. The correct result should be Stuart which is FilterArray[3].
