Continuity mistake: As Barney is turning in his deputy equipment to resign his handcuffs are hanging out of his pocket. After Barney states he wishes someone would just commit a crime, Opie enters. As the camera pans out so Andy can ask Opie what happened, the handcuffs are no longer in Barney's pocket, and he didn't put them on the desk with the rest of the equipment. (03:03:00 - 03:11:00)
Continuity mistake: When Barney and Andy are looking at Barney's picture on the front page of the newspaper, first, the article has nothing to do with Barney or the arrest, and second, when Barney takes the paper from Andy he folds it with the front page on the outside, and the page we see is not the same front page from the closeup.
Plot hole: When Barney's telling Andy about the poem written on the bank wall, Barney blames Opie and doesn't mention anything about Opie using chalk, but when Opie walks in Andy tells him, "Barney says there's a poem written on the wall of the bank, and that you were standin' along beside it with a piece of chalk in your hand," and then in a few moments Opie explains that some big kids pushed the chalk into his hands. So it's impossible for Andy to have known that chalk was used to write the poem, and not a marker, a pen, or a pencil.
Answer: Those "boxes" are valences that used to be very common, before air conditioning. They allow for windows to be open during rain storms. They permit air circulation, without letting the rain in.