API: Refactor: Enable usage of Arrays and Dictionaries as [k]vectors

- Rename a/n/m to items/size/capactity in kvec.h
- Add capactity field to Arrays/Dictionaries
API: Refactor: Add helper macros for dealing with API type casts
API: Events: Implement some redraw events