Your problem is that the system used by the <<textbox>> macro to resolve the variable you're passing it only supports static identifiers and variables within the square bracket notation. Meaning, the arithmetic you're performing there is unsupported.
The following should work as long as you're attempting to use it within the same passage:
<<set _ref to $myArray[$myArray.length - 1]>>\
<<textbox "_ref.name" "">>
It works by taking a reference to the object within the array and passing that to the macro.
Alternatively. If you use a button/link to move to the next passage you could do something like the following instead:
<<textbox "_name" "">>
<<link [[Continue|Some other passage]]>>
<<set $myArray[$myArray.length - 1].name to _name>>