Use ArrayBuffer for compact state.