Refine unused variable check.

Also, carray subscript is no longer an lvalue.
Instead of a.[i] = x please use a.i = x.
Use that in RHS too!