Q:

Why would a function defined in the same class be considered undeclared? How to declare it properly?

I'm getting the error "undeclared identifier" on the commented line:
- (BOOL) isInIntArray:(NSInteger[])array theElem:(int)elem{
    int i = 0;
    NSInteger sizeOfArray = (sizeof array) / (sizeof array[0]);
    while(i < sizeOfArray){
        if(array[i] == elem){
            return TRUE;
        }
        i++;
    }
    return FALSE;
}

- (int)getNextUnusedID{
    int i = rand()%34;
    while ([isInIntArray:idsUsed theElem:i]) { //here: Use of undeclared identifier 'isInIntArray'
        i = rand()%34;
    }
    return i;
}

I really don't understand why, they are in the same .m file.
Why would that be?
Also, this code:
NSInteger sizeOfArray = (sizeof array) / (sizeof array[0]);

is giving me the warning:

Sizeof on array function will return Sizeof 'NSInteger *' (aka: 'int *') instead of 'NSInteger[]'"

How should I properly determine the size of an array?

A:

It looks like you've missed out self from this line
while ([isInIntArray:idsUsed theElem:i])

This should be:
while ([self isInIntArray:idsUsed theElem:i])

A:

As @CaptainRedmuff pointed out, you are missing the target object in method invocation, that is self.
//[object methodParam:x param:y];

[self isInIntArray:idsUsed theElem:i];

To your second Q. In C language you cannot determine the size of an array. That's why they are not used, since we have objects for this. I recommend you to use these:
NSMutableArray *array = [[NSMutableArray alloc] init]; // to create array
array[0] = @42; // to set value at index, `@` creates objects, in this case NSNumber
[array insertObject:@42 atindex:0]; // equivalent to the above
NSInteger integer = array[0].integerValue; // get the value, call integerMethod to get plain int
integer = [[array objectAtIndex:0] integerValue]; // equivalent to the above
[array containsObject:@42]; // test if given object is in the array
[array indexOfObject:@42]; // get index of object from array, NSNotFound if not found
array.count; // to get the number of objects

Important: These arrays have variable size and they are not limited! But you can access elements only at indexes 0..(n-1) (where n in number of objects) and you can set values only for indexes 0..n.
In other words, you can not do array[3] = @42; for empty array, you need to fill first 3 positions first (indexes 0, 1 and 2).

