Javascript, CodeManage model collections in JavaScript without leaking ArrayExpose a raw array, wrap mutations in methods, or extend Array — three patterns for typed collections that block duplicates and invalid data.