Pattern formation during delamination and buckling of thin films