Weakly connected oscillatory network models for associative and dynamic memories