Create a Reactive Array That Emits Events on Mutations
Design a custom array class (or Proxy-based wrapper) that fires registered event listeners whenever the array is mutated — i.e., when items are pushed, popped, spliced, or directly set by index. Support addEventListener(event, callback) and removeEventListener() APIs similar to DOM events. This is the foundation of reactive data systems like Vue's reactivity engine and is key to understanding how frameworks detect state changes without dirty checking.