Collective buckling of an elastic beam array on an elastic substrate for applications in soft lithography