Yes, cooked macaroni, either cooked plain or assembled into a dish, can be frozen successfully. Pack it in a freezer-safe container, leave appropriate headspace, seal tightly, and freeze.