Saves values in thread local or global storage with a hash like interface