array write and read accepts expressions as length