Added tests for array callbacks (and fixed bugs they identified)