Okay, I figured something out. I didn't want to auto-lowercase everyting, since its kinda dumb to do that if they're all uppercase or whatever.
Here's the function (part of the GPL project muswap):
function array_iunique($array) {
/* Sort the array so it's alphabetical and so items beginning in uppercase (like OCRemix, which are usually more precise unless the user goes nuts with capslock) over lowercase ones (ocremix) */
usort($array, 'strcmp');
/* We make a reference array that is truly unique (but all lower case) to compare against */
$finalArray = array(); /* Declare it as blank first, just in case) */
$referenceArray = array();
/* Every value has its lower-case equivalent compared to the reference array. If it's not there, it gets added in lowercase form to the reference array and in regular form to the final array. */
foreach($array as $item) {
if(!in_array(strtolower($item), $referenceArray)) {
$finalArray[] = $item;
$referenceArray[] = strtolower($item);
}
}
return $finalArray;
}