Rewrited bash arrays section from scratch