DEV: Finished updating wrap_lib.py. Fixed _ARRAY_SHAPE()

Copied from branch enum_test, where the file was corrected for the
propper enum sorting. Fixed _ARRAY_SHAPE()