Patterns hash array ranked by frequency