Artificially Structured Boundary For Control And Confinement Of Beams And Plasmas