```python
def kth_element(arr, n, k):
    """
    Finds the kth smallest element in a given array.

    Args:
        arr: The list of numbers.
        n: The size of the array (length of arr).
        k: The position of the element to find (1-indexed).

    Returns:
        The kth smallest element in the array.
    """
    # Sort the array in non-decreasing order.
    arr.sort()
    
    # The k-th element is at index k-1 because of 0-based indexing.
    return arr[k-1]

```