Replace AssociativeArray struct with UFCS methods
Merge pull request #668 from yebblies/fixaarray

Replace AssociativeArray struct with UFCS methods
Fix for issue 11981
Switch to using pthread_key_t for Thread reference on Posix