fix handling of array index when being part of the topic

Addresses #480.

Also handles splice arguments.