Selecting an array from another tags value

I am trying to write to a particular array based off an event and which array depends on the value of another tag

if currentValue.value ==5:
system.tag.writeBlocking("[.]Test Array[[.]Test Count]", [3])

this is what I am trying and it wont write to that specific array is it possible?

Tip: format your code with </> to preserve indents and apply syntax highlighting. That way we can check for errors.

Not like that, no. There's nothing that magically causes that inner tag path to be read and used as a subscript. Make a separate line of jython to read that value, format it into the write tag path, and then write.

However, writing into an element of an array is dicey in itself. You might need to read the whole array (which is then a list), use slicing to replace that part, and write the list back.

writeBlocking needs the full tag path. Add to your script to create the path as a string before the call to writeBlocking, and pass that string to write blocking.