Minor refactoring

- Optimizing `array.compact()`
- Updating `array` docblocks
- Refactored `observer.discard()` to act as a Getter or Setter with an optional parameter