correctly lock arrays on init