Sets value of element with given key. If element with key not exists, it is created. Note: creating new elements is faster using Insert function.