[+BUGFIX] Initialize uninitialized arrays and add type hints