var and std can now work on arrays of arbitrary shapes