proper locking mechanism for ARRAY