Completed part d: Create offset array