Calculate the foo array once.