Other mistake: Aunt Bee refers to losing the pickle contest 10 years in a row (which Clara corrects to 11, leading us to believe they have been in the same competition), but this is her 2nd year in Mayberry, having not seen Andy for years in her season 1 intro as the "new housekeeper", (or Opie - ever) in season 1.
Other mistake: When Andy, Barney, and Opie switch Aunt Bee's kerosene tasting pickles with the store bought pickles during 'operation pickle switch', they put the store pickles in Aunt Bee's mason jars with silver lids and Aunt Bee's pickles in the store's jars with labels and white lids. Their plan is to give away the store jars with Bee's pickles inside, and we see Barney placing the last of the store jars into his bag, but when Barney stops the driver to give him his safe driving award, we see Barney giving away the mason jars with silver lids even though it's the store jars he should be getting rid of.
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.