How to script customers taking orders

Hey I needed help how to start off this code I’m working on for this game that im making. Just needed a bouncing off point.

I want to have the customer order a food item in the menu. The player looks at the order and makes it, places it on the plate and checks if it is right. Each ingredient is a different number so the ingredient numbers add up the food item.

My issue is how do I have the customer order a random item, and have it show the player what that item is?

I currently was trying to put the food items in an array and then made another array for the food picture. So for example if customer wants a burger = 11111, the picture would change too the burger picture to 11111 so it matches the customer order but I’m not able to achieve that.

Could there be another way to accomplish this?

Adding this script will allow you to mouse click RMB over Project window → navigate to Game/Food Item → to create asset that will describe your food items

using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu( menuName="Game/Food Item" , fileName="food item (0)" , order=1 )]
public class FoodItemAsset : ScriptableObject
{
    [Header("UI")]

	[SerializeField] string _label = $"new item type {System.Guid.NewGuid().GetHashCode()}";
    public string label => _label;

    [SerializeField] string _description = "- description text goes here -";
    public string description => _description;

    [SerializeField] Texture2D _icon;
    public Texture2D icon => _icon;
    
    [Header("Stats")]
    [SerializeField][Min(0)] int _price = 1;
    public int price => _price;
}

Once you define few items, you will be able to reference them in a array or a list where you need them:

[SerializeField] List<FoodItemAsset> _foodItems = new ();

To get a random item:

FoodItemAsset randomItem = _foodItems[ Random.Range(0,_foodItems.Count) ];

To get it’s picture:

Texture2d icon = randomItem.icon;

Do you believe this can all be done in the game manager script?