According to the 12 nidanas, perception ultimately arises out of ignorance. How can an arahant or the Buddha still experience sense contact when all ignorance is abandoned?
Hmmm I don't think it is perception, I suppose it's the (tainted, confused, reified) experience (vijnana) of the fabricated world (of forms etc).
As I understand, an arahant or Buddha "falls out of the Matrix" meaning they no longer experience the same fabricated world, but if I can push the Matrix metaphor further (just don't take it literally!) they do see those "numbers"/"lines" and they can assemble them into either the same kind of experience as of the others, or an entirely different but still coherent experience.
So it's not like they don't have an experience, they are just not "locked" into a particular kind of experience we call the world.
The 12 nidanas are not necessarily about things 'arising' or 'created' out of ignorance.
Unskilful things are 'created' by ignorance, such as craving, attachment, becoming, (self-identity) birth & (self-identity) aging-&-death.
Neutral things are 'tainted' or 'polluted' by ignorance, such as fabricators, consciousness, mind-body, sense organs, contact & feeling.
Perception is included in the fabricators, mind-body & feeling nidanas.
It follows there are two kinds of perception: (i) ignorant perception; & (ii) wise perception (often called 'full comprehension').
The quotes below may help:
Monks, ignorance is the leader in the attainment of unskillful qualities..SN 45.1
Imagine, Brahman, a bowl of water mixed with lac, turmeric, dark green or crimson dye. If a man with good eyesight were to look at the reflection of his own face in it, he would not know or see it as it really was. In the same way, Brahman, when a man dwells with his heart possessed and overwhelmed by sensual desire... then he cannot know or see, as it really is, what is to his own profit, to the profit of others, to the profit of both. Then even sacred words he has long studied are not clear to him, not to mention those he has not studied. SN 46.55
If a monk abandons passion for the property of consciousness, then owing to the abandonment of passion, the support is cut off, and there is no landing of consciousness. Consciousness, thus not having landed, not increasing, not concocting, is released. Owing to its release, it is steady. Owing to its steadiness, it is contented. Owing to its contentment, it is not agitated. Not agitated, he (the monk) is totally unbound right within. SN 22.53
A monk who is a Worthy One, devoid of mental fermentations — who has attained completion, finished the task, laid down the burden, attained the true goal, destroyed the fetters of becoming, and is released through right knowledge — directly knows earth as earth. Directly knowing earth as earth, he does not conceive things about earth, does not conceive things in earth, does not conceive things coming out of earth, does not conceive earth as 'mine,' does not delight in earth. Why is that? Because he has comprehended it, I tell you. MN 1
On seeing a form with the eye, he isn't infatuated with pleasing forms, and doesn't get upset over unpleasing forms. He dwells with body-mindfulness established, with unlimited awareness. He discerns, as it has come to be, the awareness-release & discernment-release where those evil, unskillful qualities cease without remainder. Having thus abandoned compliance & opposition, he doesn't relish any feeling he feels — pleasure, pain, neither-pleasure-nor-pain — doesn't welcome it, doesn't remain fastened to it. As he doesn't relish that feeling, doesn't welcome it, & doesn't remain fastened to it, delight doesn't arise. From the cessation of his delight comes the cessation of clinging. From the cessation of clinging comes the cessation of becoming. From the cessation of becoming comes the cessation of birth. From the cessation of birth, then aging-&-death, sorrow, lamentation, pain, distress & despair all cease. Such is the cessation of this entire mass of stress & suffering. MN 38
Unlike an Arahant, who is a disciple 'perfected in training’, whenever we perceive something through the senses our consciousness decides to either take it negatively or positively. If the response is negative we refuse it. That is revulsion. And if the response is positive we grasp it as our own. That is attachment. The great Arahants (disciples who attained the enlightenment), too perceive things, but without ignorance. In the Thera-gathas one the arahants say: “I don’t delight in living, don’t delight in dying; I live out my time, waiting my time as a worker waiting for his wage.” The arahants no longer hungers, and theirs is a happiness that doesn’t need to feed. They have come to a point where kamma is ended. The only people who are really debtless in this world are the arahants.
After attaining Arahanthood the arahants will continue to live, continues to formulate intentions, but each intention is like a seed that’s been burnt as soon as it’s created so that it doesn’t sprout into anything else. "Happy indeed are the arahants! No craving can be found in them. Cut off is the conceit ‘I am,’ Burst asunder is delusion’s net.” - The Buddha (SN 22:76)