ForgettingProfile: use locking to prevent concurrent writes to array